aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/hyperv/hyperv_net.h2
-rw-r--r--drivers/net/hyperv/netvsc.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 24441ae832d1..02a3ee282eee 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -585,7 +585,7 @@ struct nvsp_message {
585 585
586#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ 586#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */
587#define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */ 587#define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */
588#define NETVSC_SEND_BUFFER_SIZE (1024 * 1024) /* 1MB */ 588#define NETVSC_SEND_BUFFER_SIZE (1024 * 1024 * 16) /* 16MB */
589#define NETVSC_INVALID_INDEX -1 589#define NETVSC_INVALID_INDEX -1
590 590
591 591
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 592977a6547c..66979cf7fca6 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -193,8 +193,7 @@ static int netvsc_destroy_buf(struct netvsc_device *net_device)
193 } 193 }
194 if (net_device->send_buf) { 194 if (net_device->send_buf) {
195 /* Free up the receive buffer */ 195 /* Free up the receive buffer */
196 free_pages((unsigned long)net_device->send_buf, 196 vfree(net_device->send_buf);
197 get_order(net_device->send_buf_size));
198 net_device->send_buf = NULL; 197 net_device->send_buf = NULL;
199 } 198 }
200 kfree(net_device->send_section_map); 199 kfree(net_device->send_section_map);
@@ -303,9 +302,7 @@ static int netvsc_init_buf(struct hv_device *device)
303 302
304 /* Now setup the send buffer. 303 /* Now setup the send buffer.
305 */ 304 */
306 net_device->send_buf = 305 net_device->send_buf = vzalloc(net_device->send_buf_size);
307 (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
308 get_order(net_device->send_buf_size));
309 if (!net_device->send_buf) { 306 if (!net_device->send_buf) {
310 netdev_err(ndev, "unable to allocate send " 307 netdev_err(ndev, "unable to allocate send "
311 "buffer of size %d\n", net_device->send_buf_size); 308 "buffer of size %d\n", net_device->send_buf_size);