linux-mips
[Top] [All Lists]

Re: PATCH SB1250 NAPI support

To: "Francois Romieu" <romieu@fr.zoreil.com>
Subject: Re: PATCH SB1250 NAPI support
From: "Tom Rix" <trix@specifix.com>
Date: Sat, 01 Jul 2006 08:27:52 -0500
Cc: tbm@cyrius.com, jgarzik@pobox.com, netdev@vger.kernel.org, linux-mips@linux-mips.org, mark.e.mason@broadcom.com
In-reply-to: <20060629200107.GA8122@electric-eye.fr.zoreil.com>
Organization: specifix
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060524125512.GO12089@deprecation.cyrius.com> <op.s93yprpethfl8t@localhost.localdomain> <20060525133505.GH8746@deprecation.cyrius.com> <op.tamrhvwlthfl8t@localhost.localdomain> <20060629200107.GA8122@electric-eye.fr.zoreil.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Opera M2/8.51 (Linux, build 1462)
Here is a revised patch that does the interupt masking earlier. Since resetting the mask is done now in 3 places, I created a macro to handle it. This patch has been tested on the linux-mips kernel from 6/29/06 on a sb1250.
Tom

On Thu, 29 Jun 2006 15:01:07 -0500, Francois Romieu <romieu@fr.zoreil.com> wrote:

Tom Rix <trix@specifix.com> :
[...]
diff -rup a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
--- a/drivers/net/sb1250-mac.c  2006-03-09 04:25:41.000000000 -0600
+++ b/drivers/net/sb1250-mac.c  2006-03-09 05:30:52.000000000 -0600
[...]
@@ -2079,13 +2095,31 @@ static irqreturn_t sbmac_intr(int irq,vo
                 * Transmits on channel 0
                 */
+#if defined(CONFIG_SBMAC_NAPI)
                if (isr & (M_MAC_INT_CHANNEL << S_MAC_TX_CH0)) {
-                       sbdma_tx_process(sc,&(sc->sbm_txdma));
+                       sbdma_tx_process(sc,&(sc->sbm_txdma), 0);
                }
                /*
                 * Receives on channel 0
                 */
+               if (isr & (M_MAC_INT_CHANNEL << S_MAC_RX_CH0)) {
+                       if (netif_rx_schedule_prep(dev))
+                       {

An irq could appear here. I am skeptical that it is safe to write
the irq mask register so late.

One should probably consider a break in the enclosing "for" loop too.


+                               __raw_writeq(0, sc->sbm_imr);
+                               __netif_rx_schedule(dev);
+                       }
+                       else
+                       {

} else {, please.




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Attachment: mips-sb1250-mac-NAPI-5.patch
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
  • Re: PATCH SB1250 NAPI support, Tom Rix <=