Skip to content

Commit

Permalink
spidernet: service TX later.
Browse files Browse the repository at this point in the history
When entering the netdev poll routine, empty out the RX
chain first, before cleaning up the TX chain. This should
help avoid RX buffer overflows.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Linas Vepstas authored and Jeff Garzik committed Jul 9, 2007
1 parent 9e0a6e2 commit e1fd907
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,6 @@ spider_net_poll(struct net_device *netdev, int *budget)
int packets_to_do, packets_done = 0;
int no_more_packets = 0;

spider_net_cleanup_tx_ring(card);
packets_to_do = min(*budget, netdev->quota);

while (packets_to_do) {
Expand All @@ -1310,6 +1309,8 @@ spider_net_poll(struct net_device *netdev, int *budget)
spider_net_refill_rx_chain(card);
spider_net_enable_rxdmac(card);

spider_net_cleanup_tx_ring(card);

/* if all packets are in the stack, enable interrupts and return 0 */
/* if not, return 1 */
if (no_more_packets) {
Expand Down

0 comments on commit e1fd907

Please sign in to comment.