]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
spidernet: service TX later.
authorLinas Vepstas <linas@austin.ibm.com>
Mon, 11 Jun 2007 18:59:21 +0000 (13:59 -0500)
committerJeff Garzik <jeff@garzik.org>
Mon, 9 Jul 2007 02:16:41 +0000 (22:16 -0400)
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>
drivers/net/spider_net.c

index 628efc01f273a80c8e12c3d2c5722d4b9d28986f..946b2e244f65365c284cdc6b1e4ae775b7c75d2d 100644 (file)
@@ -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) {
@@ -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) {