diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2020-02-16 08:03:32 +1100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-16 19:48:22 -0800 |
commit | 8fe676b3db7a94ae14e274e24395e96ab3f09e8b (patch) | |
tree | f25c99dc082d074083fcd911854cef00db6447b0 /drivers/net/ethernet/natsemi | |
parent | 13cfff1a902c647fc9d5ef9c090106097d7b7f79 (diff) | |
download | linux-8fe676b3db7a94ae14e274e24395e96ab3f09e8b.tar.bz2 |
net/sonic: Start packet transmission immediately
Give the transmit command as soon as the transmit descriptor is ready.
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/natsemi')
-rw-r--r-- | drivers/net/ethernet/natsemi/sonic.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/natsemi/sonic.c b/drivers/net/ethernet/natsemi/sonic.c index 508c6a80fc6e..dd3605aa5f23 100644 --- a/drivers/net/ethernet/natsemi/sonic.c +++ b/drivers/net/ethernet/natsemi/sonic.c @@ -311,12 +311,17 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) sonic_tda_put(dev, entry, SONIC_TD_LINK, sonic_tda_get(dev, entry, SONIC_TD_LINK) | SONIC_EOL); + sonic_tda_put(dev, lp->eol_tx, SONIC_TD_LINK, ~SONIC_EOL & + sonic_tda_get(dev, lp->eol_tx, SONIC_TD_LINK)); + + netif_dbg(lp, tx_queued, dev, "%s: issuing Tx command\n", __func__); + + SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP); + lp->tx_len[entry] = length; lp->tx_laddr[entry] = laddr; lp->tx_skb[entry] = skb; - sonic_tda_put(dev, lp->eol_tx, SONIC_TD_LINK, - sonic_tda_get(dev, lp->eol_tx, SONIC_TD_LINK) & ~SONIC_EOL); lp->eol_tx = entry; entry = (entry + 1) & SONIC_TDS_MASK; @@ -327,10 +332,6 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) /* after this packet, wait for ISR to free up some TDAs */ } - netif_dbg(lp, tx_queued, dev, "%s: issuing Tx command\n", __func__); - - SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP); - spin_unlock_irqrestore(&lp->lock, flags); return NETDEV_TX_OK; |