diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 1b320bcf150a4..ca68aa1df801d 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -388,10 +388,11 @@ static int netvsc_init_buf(struct hv_device *device, net_device->recv_section_size = resp->sections[0].sub_alloc_size; net_device->recv_section_cnt = resp->sections[0].num_sub_allocs; - /* Setup receive completion ring */ - net_device->recv_completion_cnt - = round_up(net_device->recv_section_cnt + 1, - PAGE_SIZE / sizeof(u64)); + /* Setup receive completion ring. + * Add 1 to the recv_section_cnt because at least one entry in a + * ring buffer has to be empty. + */ + net_device->recv_completion_cnt = net_device->recv_section_cnt + 1; ret = netvsc_alloc_recv_comp_ring(net_device, 0); if (ret) goto cleanup;