瀏覽代碼

IPoIB: Clean up if posting receives fails

If posting receives in ipoib_ib_dev_open() fails, call
ipoib_ib_dev_stop() to move the device's QP back to the RESET state so
that we can try again later.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Eli Cohen 19 年之前
父節點
當前提交
54d07e2a1e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/infiniband/ulp/ipoib/ipoib_ib.c

+ 1 - 0
drivers/infiniband/ulp/ipoib/ipoib_ib.c

@@ -416,6 +416,7 @@ int ipoib_ib_dev_open(struct net_device *dev)
 	ret = ipoib_ib_post_receives(dev);
 	if (ret) {
 		ipoib_warn(priv, "ipoib_ib_post_receives returned %d\n", ret);
+		ipoib_ib_dev_stop(dev);
 		return -1;
 	}