linux/drivers/net/ethernet/faraday
Benjamin Herrenschmidt 10cbd64076 ftgmac100: Rework NAPI & interrupts handling
First, don't look at the interrupt status in the poll loop
to decide what to poll. It's wrong. If we have run out of
budget, we may still have RX packets to unqueue but no more
RX interrupt pending.

So instead move the code looking at the interrupt status
into the interrupt handler where it belongs. That avoids a slow
MMIO read in the NAPI fast path. We keep the abnormal interrupts
enabled while NAPI is scheduled.

While at it, actually do something useful in the "error" cases:

On AHB bus error, trigger the new reset task, that's about all
we can do. On RX packet fifo or descriptor overflows, we need
to restart the MAC after having freed things up. So set a flag
that NAPI will see and use to perform that restart after
harvesting the RX ring.

Finally, we shouldn't complete NAPI if there are still outgoing
packets that will need harvesting. Waiting for more interrupts
is less efficient than letting NAPI run a while longer while
the queue drains.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-06 12:38:04 -07:00
..
ftgmac100.c ftgmac100: Rework NAPI & interrupts handling 2017-04-06 12:38:04 -07:00
ftgmac100.h ftgmac100: Rework NAPI & interrupts handling 2017-04-06 12:38:04 -07:00
ftmac100.c drivers: net: ethernet: remove incorrect __exit markups 2017-03-02 14:33:49 -08:00
ftmac100.h
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile