提交 40975962 编写于 作者: S stephen hemminger 提交者: David S. Miller

netvsc: use hv_get_bytes_to_read

Don't need need to look at write space in netvsc_close.
Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 60b86665
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册