diff options
author | John Crispin <john@phrozen.org> | 2016-06-10 13:28:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-10 23:29:30 -0700 |
commit | 82c6544dddc6c4bd940917af2f987dee6be0fc17 (patch) | |
tree | 234803d45cfa608f97e925eb24984d97b8255071 /drivers/net/ethernet | |
parent | ad3cba989e8b1bbefe078eece29f0e8d8aaea1d6 (diff) | |
download | op-kernel-dev-82c6544dddc6c4bd940917af2f987dee6be0fc17.zip op-kernel-dev-82c6544dddc6c4bd940917af2f987dee6be0fc17.tar.gz |
net: mediatek: remove superfluous queue wake up call
The code checks if the queue should be stopped because we are below the
threshold of free descriptors only to check if it should be started again.
If we do end up in a state where we are at the threshold limit, it makes
more sense to just stop the queue and wait for the next IRQ to trigger the
TX housekeeping again. There is no rush in enqueuing the next packet, it
needs to wait for all the others in the queue to be dispatched first
anyway.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 40e37b15..d1cdc2d 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -783,12 +783,9 @@ static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) if (mtk_tx_map(skb, dev, tx_num, ring, gso) < 0) goto drop; - if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) { + if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) mtk_stop_queue(eth); - if (unlikely(atomic_read(&ring->free_count) > - ring->thresh)) - mtk_wake_queue(eth); - } + spin_unlock_irqrestore(ð->page_lock, flags); return NETDEV_TX_OK; |