aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_verbs.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_verbs.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
index e5cc43074196..851c8219d501 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
@@ -141,6 +141,7 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
141 .sq_sig_type = IB_SIGNAL_ALL_WR, 141 .sq_sig_type = IB_SIGNAL_ALL_WR,
142 .qp_type = IB_QPT_UD 142 .qp_type = IB_QPT_UD
143 }; 143 };
144 struct ib_cq_init_attr cq_attr = {};
144 145
145 int ret, size; 146 int ret, size;
146 int i; 147 int i;
@@ -176,16 +177,20 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
176 else 177 else
177 size += ipoib_recvq_size * ipoib_max_conn_qp; 178 size += ipoib_recvq_size * ipoib_max_conn_qp;
178 } else 179 } else
179 goto out_free_wq; 180 if (ret != -ENOSYS)
181 goto out_free_wq;
180 182
181 priv->recv_cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL, dev, size, 0); 183 cq_attr.cqe = size;
184 priv->recv_cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL,
185 dev, &cq_attr);
182 if (IS_ERR(priv->recv_cq)) { 186 if (IS_ERR(priv->recv_cq)) {
183 printk(KERN_WARNING "%s: failed to create receive CQ\n", ca->name); 187 printk(KERN_WARNING "%s: failed to create receive CQ\n", ca->name);
184 goto out_cm_dev_cleanup; 188 goto out_cm_dev_cleanup;
185 } 189 }
186 190
191 cq_attr.cqe = ipoib_sendq_size;
187 priv->send_cq = ib_create_cq(priv->ca, ipoib_send_comp_handler, NULL, 192 priv->send_cq = ib_create_cq(priv->ca, ipoib_send_comp_handler, NULL,
188 dev, ipoib_sendq_size, 0); 193 dev, &cq_attr);
189 if (IS_ERR(priv->send_cq)) { 194 if (IS_ERR(priv->send_cq)) {
190 printk(KERN_WARNING "%s: failed to create send CQ\n", ca->name); 195 printk(KERN_WARNING "%s: failed to create send CQ\n", ca->name);
191 goto out_free_recv_cq; 196 goto out_free_recv_cq;