[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070725.173731.98526781.davem@davemloft.net>
Date: Wed, 25 Jul 2007 17:37:31 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: shemminger@...ux-foundation.org
Cc: netdev@...r.kernel.org, jgarzik@...ox.com, hadi@...erus.ca,
rusty@...tcorp.com.au
Subject: Re: [PATCH RFC]: napi_struct V4
From: Stephen Hemminger <shemminger@...ux-foundation.org>
Date: Wed, 25 Jul 2007 09:56:54 +0100
> The usage of NAPI on 8139cp and 8139too seems dodgy;
> these drivers expect this to work:
>
> local_irq_save(flags);
> cpw16_f(IntrMask, cp_intr_mask);
> __netif_rx_complete(dev);
> local_irq_restore(flags);
>
> It works on SMP only because if poll races with IRQ,
> the IRQ is not masked or cleared so the IRQ will get restarted.
>
> Better would be to change it to:
> spin_lock_irqsave(&cp->lock, flags);
> cpw16_f(IntrMask, cp_intr_mask);
> __netif_rx_complete(dev);
> spin_unlock_irqrestore(&cp->lock, flags);
>
> Which actually is same code on UP.
I've made these fixes to my tree, thanks Stephen.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists