Skip to content

Commit

Permalink
pasemi_mac: Clean TX ring in poll
Browse files Browse the repository at this point in the history
Unfortunately there's no timeout for how long a packet can sit on
the TX ring after completion before an interrupt is generated, and
we want to have a threshold that's larger than one packet per interrupt.

So we have to have a timer that occasionally cleans the TX ring even
though there hasn't been an interrupt. Instead of setting up a dedicated
timer for this, just clean it in the NAPI poll routine instead.

[ Resolved conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Olof Johansson authored and David S. Miller committed Oct 10, 2007
1 parent 6fba848 commit 829185e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/pasemi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,7 @@ static int pasemi_mac_poll(struct napi_struct *napi, int budget)
struct net_device *dev = mac->netdev;
int pkts;

pasemi_mac_clean_tx(mac);
pkts = pasemi_mac_clean_rx(mac, budget);
if (pkts < budget) {
/* all done, no more packets present */
Expand Down

0 comments on commit 829185e

Please sign in to comment.