aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2014-01-16 14:59:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 11:27:34 -0500
commit269f979467cf49f2ea8132316c1f00f8c9678f7c (patch)
treeb66fc8d21c4e0c3a12c73fa2def630785a6d975d
parente28bab4828354583bb66ac09021ca69b341a7db4 (diff)
Drivers: hv: vmbus: Don't timeout during the initial connection with host
When the guest attempts to connect with the host when there may already be a connection with the host (as would be the case during the kdump/kexec path), it is difficult to guarantee timely response from the host. Starting with WS2012 R2, the host supports this ability to re-connect with the host (explicitly to support kexec). Prior to responding to the guest, the host needs to ensure that device states based on the previous connection to the host have been properly torn down. This may introduce unbounded delays. To deal with this issue, don't do a timed wait during the initial connect with the host. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hv/connection.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index 855bbda9964d..f2d7bf90c9fe 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -67,7 +67,6 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
67 int ret = 0; 67 int ret = 0;
68 struct vmbus_channel_initiate_contact *msg; 68 struct vmbus_channel_initiate_contact *msg;
69 unsigned long flags; 69 unsigned long flags;
70 int t;
71 70
72 init_completion(&msginfo->waitevent); 71 init_completion(&msginfo->waitevent);
73 72
@@ -102,15 +101,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
102 } 101 }
103 102
104 /* Wait for the connection response */ 103 /* Wait for the connection response */
105 t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ); 104 wait_for_completion(&msginfo->waitevent);
106 if (t == 0) {
107 spin_lock_irqsave(&vmbus_connection.channelmsg_lock,
108 flags);
109 list_del(&msginfo->msglistentry);
110 spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock,
111 flags);
112 return -ETIMEDOUT;
113 }
114 105
115 spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); 106 spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
116 list_del(&msginfo->msglistentry); 107 list_del(&msginfo->msglistentry);