[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070305224358.GB16290@sirena.org.uk>
Date: Mon, 5 Mar 2007 22:43:59 +0000
From: Mark Brown <broonie@...ena.org.uk>
To: Sergei Shtylyov <sshtylyov@...mvista.com>
Cc: jgarzik@...ox.com, netdev@...r.kernel.org, mhuth@...sta.com
Subject: Re: [PATCH] natsemi: netpoll fixes
[Once more with CCs]
On Tue, Mar 06, 2007 at 12:10:08AM +0400, Sergei Shtylyov wrote:
> #ifdef CONFIG_NET_POLL_CONTROLLER
> static void natsemi_poll_controller(struct net_device *dev)
> {
> + struct netdev_private *np = netdev_priv(dev);
> +
> disable_irq(dev->irq);
> - intr_handler(dev->irq, dev);
> +
> + /*
> + * A real interrupt might have already reached us at this point
> + * but NAPI might still haven't called us back. As the
> interrupt
> + * status register is cleared by reading, we should prevent an
> + * interrupt loss in this case...
> + */
> + if (!np->intr_status)
> + intr_handler(dev->irq, dev);
> +
> enable_irq(dev->irq);
Is it possible for this to run at the same time as the NAPI poll? If so
then it is possible for the netpoll poll to run between np->intr_status
being cleared and netif_rx_complete() being called. If the hardware
asserts an interrupt at the wrong moment then this could cause the
In any case, this is a problem independently of netpoll if the chip
shares an interrupt with anything so the interrupt handler should be
fixed to cope with this situation instead.
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
Download attachment "signature.asc" of type "application/pgp-signature" (308 bytes)
Powered by blists - more mailing lists