public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: linas@austin•ibm.com (Linas Vepstas)
To: jeff@garzik•org, akpm@osdl•org
Cc: netdev@vger•kernel.org, James K Lewis <jklewis@us•ibm.com>,
	linux-kernel@vger•kernel.org, Arnd Bergmann <arnd@arndb•de>,
	linuxppc-dev@ozlabs•org
Subject: [PATCH 5/6]: powerpc/cell spidernet ethtool -i version number
Date: Fri, 29 Sep 2006 18:26:25 -0500	[thread overview]
Message-ID: <20060929232625.GM6433@austin.ibm.com> (raw)
In-Reply-To: <20060929230552.GG6433@austin.ibm.com>


Jim, as the official maintainer, you should explicitly ack this patch.
--linas

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>
Cc: James K Lewis <jklewis@us•ibm.com>
Cc: Arnd Bergmann <arnd@arndb•de>

----

 drivers/net/spider_net.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6.18-mm2/drivers/net/spider_net.c
===================================================================
--- linux-2.6.18-mm2.orig/drivers/net/spider_net.c	2006-09-29 17:01:39.000000000 -0500
+++ linux-2.6.18-mm2/drivers/net/spider_net.c	2006-09-29 17:39:06.000000000 -0500
@@ -887,9 +887,10 @@ out:
  * 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)
@@ -1093,6 +1094,7 @@ spider_net_poll(struct net_device *netde
 	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) {
@@ -1505,10 +1507,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);

  parent reply	other threads:[~2006-09-29 23:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-29 23:05 [PATCH 0/6]: powerpc/cell spidernet ethernet patches Linas Vepstas
2006-09-29 23:15 ` [PATCH 1/6]: powerpc/cell spidernet burst alignment patch Linas Vepstas
2006-09-30 10:29   ` Arnd Bergmann
2006-09-29 23:17 ` [PATCH 2/6]: powerpc/cell spidernet low watermark patch Linas Vepstas
2006-09-30 10:30   ` Arnd Bergmann
2006-09-29 23:19 ` [PATCH 3/6]: powerpc/cell spidernet stop error printing patch Linas Vepstas
2006-09-30 10:32   ` Arnd Bergmann
2006-09-29 23:21 ` [PATCH 4/6]: powerpc/cell spidernet ethtool -i version number info Linas Vepstas
2006-09-30 10:33   ` Arnd Bergmann
2006-10-02 17:14     ` Linas Vepstas
2006-09-29 23:26 ` Linas Vepstas [this message]
2006-09-30 10:35   ` [PATCH 5/6]: powerpc/cell spidernet ethtool -i version number Arnd Bergmann
2006-09-29 23:29 ` [PATCH 6/6]: powerpc/cell spidernet refine locking Linas Vepstas
2006-09-30  2:47   ` Andrew Morton
2006-10-02 17:47     ` Linas Vepstas
2006-09-30 10:40 ` [PATCH 0/6]: powerpc/cell spidernet ethernet patches Arnd Bergmann
2006-10-02 16:27   ` Linas Vepstas
2006-10-02 16:50     ` Arnd Bergmann
2006-10-02 17:23       ` Linas Vepstas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060929232625.GM6433@austin.ibm.com \
    --to=linas@austin$(echo .)ibm.com \
    --cc=akpm@osdl$(echo .)org \
    --cc=arnd@arndb$(echo .)de \
    --cc=jeff@garzik$(echo .)org \
    --cc=jklewis@us$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox