aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2006-10-10 17:13:05 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-11 04:04:26 -0400
commit68a8c609b3071c2441fa64f584d15311f2c10e61 (patch)
tree4b58a435e0dd351517366051896a92997bba2771 /drivers
parent204e5fa17c7ba45a89989f8da6dfe8e54d64b79b (diff)
[PATCH] powerpc/cell spidernet NAPI polling info.
This patch moves transmit queue cleanup code out of the interrupt context, and into the NAPI polling routine. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: James K Lewis <jklewis@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/spider_net.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 96b5d00c21da..e429abc1e947 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -715,7 +715,7 @@ spider_net_release_tx_descr(struct spider_net_card *card)
715 len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len; 715 len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
716 pci_unmap_single(card->pdev, descr->buf_addr, len, 716 pci_unmap_single(card->pdev, descr->buf_addr, len,
717 PCI_DMA_TODEVICE); 717 PCI_DMA_TODEVICE);
718 dev_kfree_skb_any(skb); 718 dev_kfree_skb(skb);
719} 719}
720 720
721static void 721static void
@@ -885,9 +885,10 @@ spider_net_xmit(struct sk_buff *skb, struct net_device *netdev)
885 * spider_net_cleanup_tx_ring - cleans up the TX ring 885 * spider_net_cleanup_tx_ring - cleans up the TX ring
886 * @card: card structure 886 * @card: card structure
887 * 887 *
888 * spider_net_cleanup_tx_ring is called by the tx_timer (as we don't use 888 * spider_net_cleanup_tx_ring is called by either the tx_timer
889 * interrupts to cleanup our TX ring) and returns sent packets to the stack 889 * or from the NAPI polling routine.
890 * by freeing them 890 * This routine releases resources associted with transmitted
891 * packets, including updating the queue tail pointer.
891 */ 892 */
892static void 893static void
893spider_net_cleanup_tx_ring(struct spider_net_card *card) 894spider_net_cleanup_tx_ring(struct spider_net_card *card)
@@ -1092,6 +1093,7 @@ spider_net_poll(struct net_device *netdev, int *budget)
1092 int packets_to_do, packets_done = 0; 1093 int packets_to_do, packets_done = 0;
1093 int no_more_packets = 0; 1094 int no_more_packets = 0;
1094 1095
1096 spider_net_cleanup_tx_ring(card);
1095 packets_to_do = min(*budget, netdev->quota); 1097 packets_to_do = min(*budget, netdev->quota);
1096 1098
1097 while (packets_to_do) { 1099 while (packets_to_do) {
@@ -1504,10 +1506,8 @@ spider_net_interrupt(int irq, void *ptr)
1504 spider_net_rx_irq_off(card); 1506 spider_net_rx_irq_off(card);
1505 netif_rx_schedule(netdev); 1507 netif_rx_schedule(netdev);
1506 } 1508 }
1507 if (status_reg & SPIDER_NET_TXINT ) { 1509 if (status_reg & SPIDER_NET_TXINT)
1508 spider_net_cleanup_tx_ring(card); 1510 netif_rx_schedule(netdev);
1509 netif_wake_queue(netdev);
1510 }
1511 1511
1512 if (status_reg & SPIDER_NET_ERRINT ) 1512 if (status_reg & SPIDER_NET_ERRINT )
1513 spider_net_handle_error_irq(card, status_reg); 1513 spider_net_handle_error_irq(card, status_reg);