summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/7990.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-04-24 21:38:12 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-26 21:53:05 +0200
commit926f27300100f4233c7665649f68fcf615f58d68 (patch)
tree58af43e4fc60545d7d6514e23e4061108561b89d /drivers/net/ethernet/amd/7990.c
parentatle1: remove LLTX support and TX_UNLOCKED (diff)
downloadlinux-926f27300100f4233c7665649f68fcf615f58d68.tar.xz
linux-926f27300100f4233c7665649f68fcf615f58d68.zip
drivers: net: use NETDEV_TX_OK instead of NETDEV_TX_LOCKED
These drivers already call netif_stop_queue() so we should not be called unless tx space is available. Just free the skb and return TX_OK. Followup patch will remove NETDEV_TX_LOCKED from the kernel. Cc: linux-parisc@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: Thomas Sailer <t.sailer@alumni.ethz.ch> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/7990.c')
-rw-r--r--drivers/net/ethernet/amd/7990.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/7990.c b/drivers/net/ethernet/amd/7990.c
index 66d0b73c39c0..8e7575571531 100644
--- a/drivers/net/ethernet/amd/7990.c
+++ b/drivers/net/ethernet/amd/7990.c
@@ -543,11 +543,13 @@ int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int outs;
unsigned long flags;
- if (!TX_BUFFS_AVAIL)
- return NETDEV_TX_LOCKED;
-
netif_stop_queue(dev);
+ if (!TX_BUFFS_AVAIL) {
+ dev_consume_skb_any(skb);
+ return NETDEV_TX_OK;
+ }
+
skblen = skb->len;
#ifdef DEBUG_DRIVER