diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2014-03-09 16:10:59 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-10 16:11:26 -0400 |
commit | 99d3016de4f2a29635f5382b0e9bd0e5f2151487 (patch) | |
tree | 326bb8a6aedb25542cde76531f59ff4b7c9b76ab /drivers/net/hyperv/netvsc.c | |
parent | 3772ab1d37bc02ae4fe7cccb8f6540ff49ace8f7 (diff) | |
download | op-kernel-dev-99d3016de4f2a29635f5382b0e9bd0e5f2151487.zip op-kernel-dev-99d3016de4f2a29635f5382b0e9bd0e5f2151487.tar.gz |
hyperv: Change the receive buffer size for legacy hosts
Due to a bug in the Hyper-V host verion 2008R2, we need to use a slightly smaller
receive buffer size, otherwise the buffer will not be accepted by the legacy hosts.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 1a0280d..daddea2 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -365,6 +365,11 @@ static int netvsc_connect_vsp(struct hv_device *device) goto cleanup; /* Post the big receive buffer to NetVSP */ + if (net_device->nvsp_version <= NVSP_PROTOCOL_VERSION_2) + net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE_LEGACY; + else + net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE; + ret = netvsc_init_recv_buf(device); cleanup: @@ -898,7 +903,6 @@ int netvsc_device_add(struct hv_device *device, void *additional_info) ndev = net_device->ndev; /* Initialize the NetVSC channel extension */ - net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE; spin_lock_init(&net_device->recv_pkt_list_lock); INIT_LIST_HEAD(&net_device->recv_pkt_list); |