diff options
author | stephen hemminger <stephen@networkplumber.org> | 2017-06-08 16:21:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-09 12:15:02 -0400 |
commit | 40975962788ef5b796ab0f36bfd7051064c915d3 (patch) | |
tree | 2f2b08527747c721668025da6cfccbdbc1f2f409 /drivers/net/hyperv | |
parent | 60b86665af0dfbeebda8aae43f0ba451cd2dcfe5 (diff) |
netvsc: use hv_get_bytes_to_read
Don't need need to look at write space in netvsc_close.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index df6d8e28949e..436a3ad55cfd 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -120,7 +120,7 @@ static int netvsc_close(struct net_device *net) struct net_device_context *net_device_ctx = netdev_priv(net); struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); int ret; - u32 aread, awrite, i, msec = 10, retry = 0, retry_max = 20; + u32 aread, i, msec = 10, retry = 0, retry_max = 20; struct vmbus_channel *chn; netif_tx_disable(net); @@ -141,15 +141,11 @@ static int netvsc_close(struct net_device *net) if (!chn) continue; - hv_get_ringbuffer_availbytes(&chn->inbound, &aread, - &awrite); - + aread = hv_get_bytes_to_read(&chn->inbound); if (aread) break; - hv_get_ringbuffer_availbytes(&chn->outbound, &aread, - &awrite); - + aread = hv_get_bytes_to_read(&chn->outbound); if (aread) break; } |