Skip to contentSkip to conversation

IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM

PATCH Applied Jason Gunthorpe 2 participants 2 messages Jul 22, 2015 – Jul 23, 2015 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM

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)
---
 drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/ulp/ipoib/ipoib_verbs.c +2 -1
index 9e6ee82a8fd7..851c8219d501 100644
@@ -177,7 +177,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;
 
 	cq_attr.cqe = size;
 	priv->recv_cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL,
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20150722203003.GA9613-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

Applied
#2 lore raw
Quoted 19 lines · Jason Gunthorpe

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)
---
 drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/ulp/ipoib/ipoib_verbs.c +0 -0
index 9e6ee82a8fd7..851c8219d501 100644

drivers/infiniband/ulp/ipoib/ipoib_verbs.c int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca) · line 184

Quoted 9 lines
drivers/infiniband/ulp/ipoib/ipoib_verbs.c +2 -1
@@ -177,7 +177,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;
 
 	cq_attr.cqe = size;
 	priv->recv_cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL,

Thanks, applied for 4.2-rc.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD