[openib-general] [PATCH] ipoib_init_qp error handling

Michael S. Tsirkin mst at mellanox.co.il
Wed Jan 4 04:09:32 PST 2006


If qp modify to init failed, hardware is likely wedged, so its safer
not to try to modify it to reset.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: latest/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
===================================================================
--- latest.orig/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
+++ latest/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
@@ -122,7 +122,7 @@ int ipoib_init_qp(struct net_device *dev
 	ret = ib_modify_qp(priv->qp, &qp_attr, attr_mask);
 	if (ret) {
 		ipoib_warn(priv, "failed to modify QP to init, ret = %d\n", ret);
-		goto out_fail;
+		return ret;
 	}
 
 	qp_attr.qp_state = IB_QPS_RTR;

-- 
MST



More information about the general mailing list