summaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2006-10-10 23:13:05 +0200
committerJeff Garzik <jeff@garzik.org>2006-10-11 10:04:26 +0200
commit68a8c609b3071c2441fa64f584d15311f2c10e61 (patch)
tree4b58a435e0dd351517366051896a92997bba2771 /drivers/net/spider_net.c
parent[PATCH] powerpc/cell spidernet low watermark patch. (diff)
downloadlinux-68a8c609b3071c2441fa64f584d15311f2c10e61.tar.xz
linux-68a8c609b3071c2441fa64f584d15311f2c10e61.zip
[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/net/spider_net.c')
-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)
len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
pci_unmap_single(card->pdev, descr->buf_addr, len,
PCI_DMA_TODEVICE);
- dev_kfree_skb_any(skb);
+ dev_kfree_skb(skb);
}
static void
@@ -885,9 +885,10 @@ spider_net_xmit(struct sk_buff *skb, struct net_device *netdev)
* spider_net_cleanup_tx_ring - cleans up the TX ring
* @card: card structure
*
- * spider_net_cleanup_tx_ring is called by the tx_timer (as we don't use
- * interrupts to cleanup our TX ring) and returns sent packets to the stack
- * by freeing them
+ * spider_net_cleanup_tx_ring is called by either the tx_timer
+ * or from the NAPI polling routine.
+ * This routine releases resources associted with transmitted
+ * packets, including updating the queue tail pointer.
*/
static void
spider_net_cleanup_tx_ring(struct spider_net_card *card)
@@ -1092,6 +1093,7 @@ 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) {
@@ -1504,10 +1506,8 @@ spider_net_interrupt(int irq, void *ptr)
spider_net_rx_irq_off(card);
netif_rx_schedule(netdev);
}
- if (status_reg & SPIDER_NET_TXINT ) {
- spider_net_cleanup_tx_ring(card);
- netif_wake_queue(netdev);
- }
+ if (status_reg & SPIDER_NET_TXINT)
+ netif_rx_schedule(netdev);
if (status_reg & SPIDER_NET_ERRINT )
spider_net_handle_error_irq(card, status_reg);