Commit 7cf375c4 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: netvsc: Increase the timeout value in the netvsc driver

commit 5c5781b3 upstream.

On some loaded windows hosts, we have discovered that the host may not
respond to guest requests within the specified time (one second)
as evidenced by the guest timing out. Fix this problem by increasing
the timeout to 5 seconds.

It may be useful to apply this patch to the 3.0 kernel as well.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3c22382d
...@@ -270,7 +270,7 @@ static int netvsc_init_recv_buf(struct hv_device *device) ...@@ -270,7 +270,7 @@ static int netvsc_init_recv_buf(struct hv_device *device)
goto cleanup; goto cleanup;
} }
t = wait_for_completion_timeout(&net_device->channel_init_wait, HZ); t = wait_for_completion_timeout(&net_device->channel_init_wait, 5*HZ);
BUG_ON(t == 0); BUG_ON(t == 0);
...@@ -513,7 +513,7 @@ static int netvsc_connect_vsp(struct hv_device *device) ...@@ -513,7 +513,7 @@ static int netvsc_connect_vsp(struct hv_device *device)
if (ret != 0) if (ret != 0)
goto cleanup; goto cleanup;
t = wait_for_completion_timeout(&net_device->channel_init_wait, HZ); t = wait_for_completion_timeout(&net_device->channel_init_wait, 5*HZ);
if (t == 0) { if (t == 0) {
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
......
...@@ -467,7 +467,7 @@ static int rndis_filter_query_device(struct rndis_device *dev, u32 oid, ...@@ -467,7 +467,7 @@ static int rndis_filter_query_device(struct rndis_device *dev, u32 oid,
if (ret != 0) if (ret != 0)
goto Cleanup; goto Cleanup;
t = wait_for_completion_timeout(&request->wait_event, HZ); t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
if (t == 0) { if (t == 0) {
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
goto Cleanup; goto Cleanup;
...@@ -543,7 +543,7 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev, ...@@ -543,7 +543,7 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev,
if (ret != 0) if (ret != 0)
goto Cleanup; goto Cleanup;
t = wait_for_completion_timeout(&request->wait_event, HZ); t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
if (t == 0) { if (t == 0) {
ret = -1; ret = -1;
...@@ -600,7 +600,7 @@ static int rndis_filter_init_device(struct rndis_device *dev) ...@@ -600,7 +600,7 @@ static int rndis_filter_init_device(struct rndis_device *dev)
} }
t = wait_for_completion_timeout(&request->wait_event, HZ); t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
if (t == 0) { if (t == 0) {
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment