|
@@ -268,6 +268,11 @@ static int netvsc_init_buf(struct hv_device *device,
|
|
|
buf_size = device_info->recv_sections * device_info->recv_section_size;
|
|
|
buf_size = roundup(buf_size, PAGE_SIZE);
|
|
|
|
|
|
+ /* Legacy hosts only allow smaller receive buffer */
|
|
|
+ if (net_device->nvsp_version <= NVSP_PROTOCOL_VERSION_2)
|
|
|
+ buf_size = min_t(unsigned int, buf_size,
|
|
|
+ NETVSC_RECEIVE_BUFFER_SIZE_LEGACY);
|
|
|
+
|
|
|
net_device->recv_buf = vzalloc(buf_size);
|
|
|
if (!net_device->recv_buf) {
|
|
|
netdev_err(ndev,
|