Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c35a2549 authored by Roland Dreier's avatar Roland Dreier
Browse files

Merge branches 'cxgb3', 'ehca', 'ipath', 'ipoib', 'mlx4' and 'nes' into for-next

Loading
Loading
Loading
Loading
+28 −16
Original line number Diff line number Diff line
@@ -359,36 +359,48 @@ static void notify_port_conf_change(struct ehca_shca *shca, int port_num)
	*old_attr = new_attr;
}

/* replay modify_qp for sqps -- return 0 if all is well, 1 if AQP1 destroyed */
static int replay_modify_qp(struct ehca_sport *sport)
{
	int aqp1_destroyed;
	unsigned long flags;

	spin_lock_irqsave(&sport->mod_sqp_lock, flags);

	aqp1_destroyed = !sport->ibqp_sqp[IB_QPT_GSI];

	if (sport->ibqp_sqp[IB_QPT_SMI])
		ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_SMI]);
	if (!aqp1_destroyed)
		ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_GSI]);

	spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);

	return aqp1_destroyed;
}

static void parse_ec(struct ehca_shca *shca, u64 eqe)
{
	u8 ec   = EHCA_BMASK_GET(NEQE_EVENT_CODE, eqe);
	u8 port = EHCA_BMASK_GET(NEQE_PORT_NUMBER, eqe);
	u8 spec_event;
	struct ehca_sport *sport = &shca->sport[port - 1];
	unsigned long flags;

	switch (ec) {
	case 0x30: /* port availability change */
		if (EHCA_BMASK_GET(NEQE_PORT_AVAILABILITY, eqe)) {
			int suppress_event;
			/* replay modify_qp for sqps */
			spin_lock_irqsave(&sport->mod_sqp_lock, flags);
			suppress_event = !sport->ibqp_sqp[IB_QPT_GSI];
			if (sport->ibqp_sqp[IB_QPT_SMI])
				ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_SMI]);
			if (!suppress_event)
				ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_GSI]);
			spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);

			/* AQP1 was destroyed, ignore this event */
			if (suppress_event)
			/* only replay modify_qp calls in autodetect mode;
			 * if AQP1 was destroyed, the port is already down
			 * again and we can drop the event.
			 */
			if (ehca_nr_ports < 0)
				if (replay_modify_qp(sport))
					break;

			sport->port_state = IB_PORT_ACTIVE;
			dispatch_port_event(shca, port, IB_EVENT_PORT_ACTIVE,
					    "is active");
			ehca_query_sma_attr(shca, port,
					    &sport->saved_attr);
			ehca_query_sma_attr(shca, port, &sport->saved_attr);
		} else {
			sport->port_state = IB_PORT_DOWN;
			dispatch_port_event(shca, port, IB_EVENT_PORT_ERR,
+5 −0
Original line number Diff line number Diff line
@@ -860,6 +860,11 @@ static struct ehca_qp *internal_create_qp(
	if (qp_type == IB_QPT_GSI) {
		h_ret = ehca_define_sqp(shca, my_qp, init_attr);
		if (h_ret != H_SUCCESS) {
			kfree(my_qp->mod_qp_parm);
			my_qp->mod_qp_parm = NULL;
			/* the QP pointer is no longer valid */
			shca->sport[init_attr->port_num - 1].ibqp_sqp[qp_type] =
				NULL;
			ret = ehca2ib_return_code(h_ret);
			goto create_qp_exit6;
		}
+5 −5
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ bail:
/**
 * ipath_get_rwqe - copy the next RWQE into the QP's RWQE
 * @qp: the QP
 * @wr_id_only: update wr_id only, not SGEs
 * @wr_id_only: update qp->r_wr_id only, not qp->r_sge
 *
 * Return 0 if no RWQE is available, otherwise return 1.
 *
@@ -173,8 +173,6 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
	u32 tail;
	int ret;

	qp->r_sge.sg_list = qp->r_sg_list;

	if (qp->ibqp.srq) {
		srq = to_isrq(qp->ibqp.srq);
		handler = srq->ibsrq.event_handler;
@@ -206,8 +204,10 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
		wqe = get_rwqe_ptr(rq, tail);
		if (++tail >= rq->size)
			tail = 0;
	} while (!wr_id_only && !ipath_init_sge(qp, wqe, &qp->r_len,
						&qp->r_sge));
		if (wr_id_only)
			break;
		qp->r_sge.sg_list = qp->r_sg_list;
	} while (!ipath_init_sge(qp, wqe, &qp->r_len, &qp->r_sge));
	qp->r_wr_id = wqe->wr_id;
	wq->tail = tail;

+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ struct ib_mr *mlx4_ib_alloc_fast_reg_mr(struct ib_pd *pd,
		goto err_mr;

	mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key;
	mr->umem = NULL;

	return &mr->ibmr;

+16 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ unsigned int wqm_quanta = 0x10000;
module_param(wqm_quanta, int, 0644);
MODULE_PARM_DESC(wqm_quanta, "WQM quanta");

static unsigned int limit_maxrdreqsz;
module_param(limit_maxrdreqsz, bool, 0644);
MODULE_PARM_DESC(limit_maxrdreqsz, "Limit max read request size to 256 Bytes");

LIST_HEAD(nes_adapter_list);
static LIST_HEAD(nes_dev_list);

@@ -588,6 +592,18 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
						nesdev->nesadapter->port_count;
	}

	if ((limit_maxrdreqsz ||
	     ((nesdev->nesadapter->phy_type[0] == NES_PHY_TYPE_GLADIUS) &&
	      (hw_rev == NE020_REV1))) &&
	    (pcie_get_readrq(pcidev) > 256)) {
		if (pcie_set_readrq(pcidev, 256))
			printk(KERN_ERR PFX "Unable to set max read request"
				" to 256 bytes\n");
		else
			nes_debug(NES_DBG_INIT, "Max read request size set"
				" to 256 bytes\n");
	}

	tasklet_init(&nesdev->dpc_tasklet, nes_dpc, (unsigned long)nesdev);

	/* bring up the Control QP */
Loading