diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-08 02:22:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-08 02:22:09 +0200 |
commit | a9e41a529681b38087c91ebc0bb91e12f510ca2d (patch) | |
tree | 544bf5861113e2f7e676a333a1267d887c800870 /drivers/net/hyperv | |
parent | net: phy: improve pause mode reporting in phy_print_status (diff) | |
parent | cxgb4: Fix error path in cxgb4_init_module (diff) | |
download | linux-a9e41a529681b38087c91ebc0bb91e12f510ca2d.tar.xz linux-a9e41a529681b38087c91ebc0bb91e12f510ca2d.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflict with the DSA legacy code removal.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index fdbeb7070d42..ee198606854d 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -875,12 +875,6 @@ static inline int netvsc_send_pkt( } else if (ret == -EAGAIN) { netif_tx_stop_queue(txq); ndev_ctx->eth_stats.stop_queue++; - if (atomic_read(&nvchan->queue_sends) < 1 && - !net_device->tx_disable) { - netif_tx_wake_queue(txq); - ndev_ctx->eth_stats.wake_queue++; - ret = -ENOSPC; - } } else { netdev_err(ndev, "Unable to send packet pages %u len %u, ret %d\n", @@ -888,6 +882,15 @@ static inline int netvsc_send_pkt( ret); } + if (netif_tx_queue_stopped(txq) && + atomic_read(&nvchan->queue_sends) < 1 && + !net_device->tx_disable) { + netif_tx_wake_queue(txq); + ndev_ctx->eth_stats.wake_queue++; + if (ret == -EAGAIN) + ret = -ENOSPC; + } + return ret; } |