]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: fix unconditionally returning IRQ_HANDLED in INTx
authorSathya Perla <sathya.perla@emulex.com>
Fri, 11 Jan 2013 22:47:02 +0000 (22:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Jan 2013 23:33:01 +0000 (15:33 -0800)
commita441ce1cfa1910c2a48dd1135c520f3280263e76
tree5404dd2b246bf672e4e2a6fe7fd175b8ab4aa4bd
parentc9730f6929a8407d27014d991b45fad66c4135db
be2net: fix unconditionally returning IRQ_HANDLED in INTx

commit fb023860 introduced an unconditional IRQ_HANDLED return in be_intx()
to workaround Lancer and BE2 HW issues. This is bad as it prevents the kernel
from detecting interrupt storms due to broken HW.

The BE2/Lancer HW issues are:
1) In Lancer, there is no means for the driver to detect if the interrupt
belonged to device, other than counting and notifying events.
2) In Lancer de-asserting INTx takes a while, causing the INTx irq handler
to be called multiple times till the de-assert happens.
3) In BE2, we see an occasional interrupt even when EQs are unarmed.

Issue (1) can cause the notified events to be orphaned, if NAPI was already
running.
This patch fixes this issue by scheduling NAPI only if it is not scheduled
already. Doing this also takes care of possible events_get() race that may be
caused due to issue (2) and (3). Also, IRQ_HANDLED is returned only the first
time zero events are detected.
(Thanks Ben H. for the feedback and suggestions.)

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c