From: Jason Gunthorpe Date: Wed, 22 Jul 2015 20:30:03 +0000 (-0600) Subject: IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM X-Git-Tag: v4.1.5~17 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d1339ce0bcb285a0756bf9037f49e258b5df636f;p=users%2Fjedix%2Flinux-maple.git IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM commit efc1eedbf63a194b3b576fc25776f3f1fa55a4d4 upstream. If the above is turned off then ipoib_cm_dev_init unconditionally returns ENOSYS, and the newly added error handling in 0b3957 prevents ipoib from coming up at all: kernel: mlx4_0: ipoib_transport_dev_init failed kernel: mlx4_0: failed to initialize port 1 (ret = -12) Fixes: 0b39578bcde4 (IB/ipoib: Use dedicated workqueues per interface) Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index e5cc43074196d..2d13fd08ceb74 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c @@ -176,7 +176,8 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca) else size += ipoib_recvq_size * ipoib_max_conn_qp; } else - goto out_free_wq; + if (ret != -ENOSYS) + goto out_free_wq; priv->recv_cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL, dev, size, 0); if (IS_ERR(priv->recv_cq)) {