From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: mason <mason@broadcom.com>
Cc: linux-mips@linux-mips.org, netdev@vger.kernel.org
Subject: Re: [PATCH] NAPI support for Sibyte MAC
Date: Sat, 24 Mar 2007 22:49:19 +0300 [thread overview]
Message-ID: <460580BF.4040904@ru.mvista.com> (raw)
In-Reply-To: <20070323171132.GA1464@broadcom.com>
Hello, you wrote:
> This patch completes the NAPI functionality for SB1250 MAC, including making
> NAPI a kernel option that can be turned on or off and adds the "sbmac_poll"
> routine.
> Index: linux-2.6.14-cgl/drivers/net/Kconfig
> ===================================================================
> --- linux-2.6.14-cgl.orig/drivers/net/Kconfig 2006-09-20 14:58:54.000000000 -0700
> +++ linux-2.6.14-cgl/drivers/net/Kconfig 2006-09-20 17:04:31.000000000 -0700
[...]
> @@ -2075,12 +2143,52 @@
> */
>
> 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);
> +#ifdef CONFIG_NETPOLL_TRAP
> + if (netpoll_trap()) {
> + if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
> + __netif_schedule(dev);
> + }
> +#endif
> }
This just doesn't make sense. That option is enabled to *prevent* calls to
__netif_schedule() -- you can't override it that way. (Well, how it works
currently, doesn't make much sense either since it totally breaks the TX queue
control -- I was going to post a patch).
> + if (isr & (M_MAC_INT_CHANNEL << S_MAC_RX_CH0)) {
> + if (netif_rx_schedule_prep(dev)) {
> + __raw_writeq(0, sc->sbm_imr);
> + __netif_rx_schedule(dev);
> + /* Depend on the exit from poll to reenable intr */
> + }
> + else {
> + /* may leave some packets behind */
> + sbdma_rx_process(sc,&(sc->sbm_rxdma),
> + SBMAC_MAX_RXDESCR * 2, 0);
> + }
> + }
> +#else
> + /* Non NAPI */
> + for (;;) {
> +
> /*
> - * Receives on channel 0
> + * Read the ISR (this clears the bits in the real
> + * register, except for counter addr)
> */
> + isr = __raw_readq(sc->sbm_isr) & ~M_MAC_COUNTER_ADDR;
> +
> + if (isr == 0)
> + break;
> +
> + handled = 1;
> +
> + if (isr & (M_MAC_INT_CHANNEL << S_MAC_TX_CH0)) {
> + sbdma_tx_process(sc,&(sc->sbm_txdma),
> + SBMAC_MAX_RXDESCR * 2);
> +#ifdef CONFIG_NETPOLL_TRAP
> + if (netpoll_trap()) {
> + if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
> + __netif_schedule(dev);
> + }
> +#endif
> + }
Same here.
WBR, Sergei
next prev parent reply other threads:[~2007-03-24 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 17:11 [PATCH] NAPI support for Sibyte MAC mason
2007-03-24 19:49 ` Sergei Shtylyov [this message]
2007-03-26 21:33 ` Mark E Mason
-- strict thread matches above, loose matches on Subject: below --
2007-03-23 18:08 Mark E Mason
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=460580BF.4040904@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=mason@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.