Skip to content

Commit

Permalink
Staging: hv: netvsc: Increase the timeout value in the netvsc driver
Browse files Browse the repository at this point in the history
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: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 2dfde96 commit 5c5781b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static int netvsc_init_recv_buf(struct hv_device *device)
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);


Expand Down Expand Up @@ -357,7 +357,7 @@ static int netvsc_connect_vsp(struct hv_device *device)
if (ret != 0)
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) {
ret = -ETIMEDOUT;
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/hv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static int rndis_filter_query_device(struct rndis_device *dev, u32 oid,
if (ret != 0)
goto Cleanup;

t = wait_for_completion_timeout(&request->wait_event, HZ);
t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
if (t == 0) {
ret = -ETIMEDOUT;
goto Cleanup;
Expand Down Expand Up @@ -528,7 +528,7 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev,
if (ret != 0)
goto Cleanup;

t = wait_for_completion_timeout(&request->wait_event, HZ);
t = wait_for_completion_timeout(&request->wait_event, 5*HZ);

if (t == 0) {
ret = -1;
Expand Down Expand Up @@ -585,7 +585,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) {
ret = -ETIMEDOUT;
Expand Down

0 comments on commit 5c5781b

Please sign in to comment.