diff mbox series

[azure:x/azure-edge:x,1/6] UBUNTU: SAUCE: vmbus-rdma: ND142: don't wait forever for disconnection from remote connector

Message ID 1518623897-18991-2-git-send-email-marcelo.cerri@canonical.com
State New
Headers show
Series Fixes for Network Direct InfiniBand/RDMA driver | expand

Commit Message

Marcelo Henrique Cerri Feb. 14, 2018, 3:58 p.m. UTC
From: Long Li <longli@microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/1749332

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
---
 drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-142.0/provider.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-142.0/provider.c b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-142.0/provider.c
index 58de2d439f29..f9179722156e 100644
--- a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-142.0/provider.c
+++ b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-142.0/provider.c
@@ -1012,7 +1012,10 @@  static int hvnd_destroy_qp(struct ib_qp *ib_qp)
 	 * Now wait for the disconnect.
 	 */
 	jiffies = get_jiffies_64();
-	wait_for_completion(&qp->connector->disconnect_event);
+	if (!wait_for_completion_timeout(&qp->connector->disconnect_event,
+					 30*HZ))
+		hvnd_warn("connector disconnect timed out\n");
+
 	hvnd_debug("Completed disconnect connector=%p jiffies=%llu\n",
 		   qp->connector, get_jiffies_64() - jiffies);