From b1dd90cea725f794185a66c4e4ccfd4fb84632b5 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Fri, 24 Mar 2017 20:54:36 -0700 Subject: netvsc: Fix a bug in sub-channel handling All netvsc channels are handled via NAPI. Setup the "read mode" correctly for the netvsc sub-channels. Signed-off-by: K. Y. Srinivasan Signed-off-by: David S. Miller --- drivers/net/hyperv/rndis_filter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 91b3bcfd9acb..983582526b37 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1002,6 +1002,11 @@ static void netvsc_sc_open(struct vmbus_channel *new_sc) if (!nvchan->mrc.buf) return; + /* Because the device uses NAPI, all the interrupt batching and + * control is done via Net softirq, not the channel handling + */ + set_channel_read_mode(new_sc, HV_CALL_ISR); + ret = vmbus_open(new_sc, nvscdev->ring_size * PAGE_SIZE, nvscdev->ring_size * PAGE_SIZE, NULL, 0, netvsc_channel_cb, nvchan); -- cgit v1.2.3 From 386f57622cc3bbb39b9c00fc8762bc9ab28e0f8d Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Fri, 24 Mar 2017 20:54:37 -0700 Subject: netvsc: Properly initialize the return value Initialize the return value correctly. Signed-off-by: K. Y. Srinivasan Signed-off-by: David S. Miller --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index eb7ae79d47bb..f830bbbd8ad4 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -855,7 +855,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu) struct hv_device *hdev = ndevctx->device_ctx; struct netvsc_device_info device_info; bool was_running; - int ret; + int ret = 0; if (!nvdev || nvdev->destroy) return -ENODEV; -- cgit v1.2.3