aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/hyperv/hyperv_net.h1
-rw-r--r--drivers/net/hyperv/netvsc.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 7d06b4959383..13010b4dae5b 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -513,6 +513,7 @@ struct nvsp_message {
513#define NETVSC_MTU 65536 513#define NETVSC_MTU 65536
514 514
515#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ 515#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */
516#define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */
516 517
517#define NETVSC_RECEIVE_BUFFER_ID 0xcafe 518#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
518 519
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 1a0280dcba7e..daddea2654ce 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)
365 goto cleanup; 365 goto cleanup;
366 366
367 /* Post the big receive buffer to NetVSP */ 367 /* Post the big receive buffer to NetVSP */
368 if (net_device->nvsp_version <= NVSP_PROTOCOL_VERSION_2)
369 net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE_LEGACY;
370 else
371 net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE;
372
368 ret = netvsc_init_recv_buf(device); 373 ret = netvsc_init_recv_buf(device);
369 374
370cleanup: 375cleanup:
@@ -898,7 +903,6 @@ int netvsc_device_add(struct hv_device *device, void *additional_info)
898 ndev = net_device->ndev; 903 ndev = net_device->ndev;
899 904
900 /* Initialize the NetVSC channel extension */ 905 /* Initialize the NetVSC channel extension */
901 net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE;
902 spin_lock_init(&net_device->recv_pkt_list_lock); 906 spin_lock_init(&net_device->recv_pkt_list_lock);
903 907
904 INIT_LIST_HEAD(&net_device->recv_pkt_list); 908 INIT_LIST_HEAD(&net_device->recv_pkt_list);