diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-07-15 07:34:51 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-07-24 00:22:51 -0400 |
commit | 4dfc1c87af46f9d8abf2ef78a4e22891d7a564c3 (patch) | |
tree | dd5614ebe258b8269d191a2d3a8458fe6d10734e | |
parent | 6b368f6859c80343e5d7c6e2a7c49df0a8a273c1 (diff) |
mv643xx_eth: fix transmit-reclaim-in-napi-poll
The mv643xx_eth driver allows doing transmit reclaim from within the
napi poll routine, but after doing reclaim, it would forget to check
the free transmit descriptor count and wake up the transmit queue if
the reclaim caused enough descriptors for a new packet to become
available. This would cause the netdev watchdog to occasionally kick
in during certain workloads with combined receive and transmit traffic.
Fix this by adding a wakeup check identical to the one in the
interrupt handler to the napi poll routine.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
-rw-r--r-- | drivers/net/mv643xx_eth.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index d7620c50efb1..3211369a4320 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -626,6 +626,12 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget) | |||
626 | for (i = 0; i < 8; i++) | 626 | for (i = 0; i < 8; i++) |
627 | if (mp->txq_mask & (1 << i)) | 627 | if (mp->txq_mask & (1 << i)) |
628 | txq_reclaim(mp->txq + i, 0); | 628 | txq_reclaim(mp->txq + i, 0); |
629 | |||
630 | if (netif_carrier_ok(mp->dev)) { | ||
631 | spin_lock(&mp->lock); | ||
632 | __txq_maybe_wake(mp->txq + mp->txq_primary); | ||
633 | spin_unlock(&mp->lock); | ||
634 | } | ||
629 | } | 635 | } |
630 | #endif | 636 | #endif |
631 | 637 | ||