> -----Original Message----- > From: Chris Moore > Sent: Tuesday, November 04, 2014 8:28 AM > To: target-devel (target-devel@xxxxxxxxxxxxxxx) > Subject: [PATCH] IB/isert: Adjust CQ size to HW limits > > > This is the isert version of the patch that Minh Tran submitted for iser. > isert has the same issue of trying to create a CQ with more CQEs than are > supported by the hardware. > > Signed-off-by: Chris Moore <chris.moore@xxxxxxxxxx> > Sorry to bother you with this, but I'm unfamiliar with the process. Is there something I need to do to get this picked up in 3.18? Thanks, Chris > --- > > diff --git a/drivers/infiniband/ulp/isert/ib_isert.c > b/drivers/infiniband/ulp/isert/ib_isert.c > index 3effa93..f837a23 100644 > --- a/drivers/infiniband/ulp/isert/ib_isert.c > +++ b/drivers/infiniband/ulp/isert/ib_isert.c > @@ -225,12 +225,16 @@ isert_create_device_ib_res(struct isert_device > *device) > struct isert_cq_desc *cq_desc; > struct ib_device_attr *dev_attr; > int ret = 0, i, j; > + int max_rx_cqe, max_tx_cqe; > > dev_attr = &device->dev_attr; > ret = isert_query_device(ib_dev, dev_attr); > if (ret) > return ret; > > + max_rx_cqe = min(ISER_MAX_RX_CQ_LEN, dev_attr->max_cqe); > + max_tx_cqe = min(ISER_MAX_TX_CQ_LEN, dev_attr->max_cqe); > + > /* asign function handlers */ > if (dev_attr->device_cap_flags & > IB_DEVICE_MEM_MGT_EXTENSIONS && > dev_attr->device_cap_flags & > IB_DEVICE_SIGNATURE_HANDOVER) { @@ -272,7 +276,7 @@ > isert_create_device_ib_res(struct isert_device *device) > isert_cq_rx_callback, > isert_cq_event_callback, > (void *)&cq_desc[i], > - ISER_MAX_RX_CQ_LEN, i); > + max_rx_cqe, i); > if (IS_ERR(device->dev_rx_cq[i])) { > ret = PTR_ERR(device->dev_rx_cq[i]); > device->dev_rx_cq[i] = NULL; > @@ -284,7 +288,7 @@ isert_create_device_ib_res(struct isert_device > *device) > isert_cq_tx_callback, > isert_cq_event_callback, > (void *)&cq_desc[i], > - ISER_MAX_TX_CQ_LEN, i); > + max_tx_cqe, i); > if (IS_ERR(device->dev_tx_cq[i])) { > ret = PTR_ERR(device->dev_tx_cq[i]); > device->dev_tx_cq[i] = NULL; -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html