OpenCloudOS-Kernel/drivers/net/ethernet/ti
Sebastian Siewior a11fbba9a7 net/cpsw: fix irq_disable() with threaded interrupts
During high throughput it is likely that we receive both: an RX and TX
interrupt. The normal behaviour is that once we enter the ISR the
interrupts are disabled in the IRQ chip and so the ISR is invoked only
once and the interrupt line is disabled once. It will be re-enabled
after napi completes.
With threaded interrupts on the other hand the interrupt the interrupt
is disabled immediately and the ISR is marked for "later". By having TX
and RX interrupt marked pending we invoke them both and disable the
interrupt line twice. The napi callback is still executed once and so
after it completes we remain with interrupts disabled.

The initial patch simply removed the cpsw_{enable|disable}_irq() calls
and it worked well on my AM335X ES1.0 (beagle bone). On ES2.0 (beagle
bone black) it caused an never ending interrupt (even after the mask via
cpsw_intr_disable()) according to Mugunthan V N. Since I don't have the
ES2.0 and no idea what is going on this patch tracks the state of the
irq_disable() call and execute it only when not yet done.
The book keeping is done on the first struct since with dual_emac we can
have two of those and only one interrupt line.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-25 04:13:18 -04:00
..
Kconfig drivers/net/ethernet/ti: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:38:41 -08:00
Makefile cpts: introduce time stamping code and a PTP hardware clock. 2012-11-01 12:21:30 -04:00
cpmac.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
cpsw.c net/cpsw: fix irq_disable() with threaded interrupts 2013-04-25 04:13:18 -04:00
cpsw_ale.c drivers: net: cpsw: Add helper functions for VLAN ALE implementation 2013-02-06 15:46:40 -05:00
cpsw_ale.h drivers: net:ethernet: cpsw: add support for VLAN 2013-02-06 15:46:40 -05:00
cpts.c cpts: fix a run time warn_on. 2012-12-26 14:15:09 -08:00
cpts.h cpts: fix build error by removing useless code. 2012-12-26 14:15:09 -08:00
davinci_cpdma.c net/ti: add MODULE_DEVICE_TABLE + MODULE_LICENSE 2013-04-25 04:12:29 -04:00
davinci_cpdma.h net/davinci_cpdma: remove unused argument in cpdma_chan_submit() 2013-04-25 04:11:50 -04:00
davinci_emac.c net/davinci_cpdma: remove unused argument in cpdma_chan_submit() 2013-04-25 04:11:50 -04:00
davinci_mdio.c net/ti: add MODULE_DEVICE_TABLE + MODULE_LICENSE 2013-04-25 04:12:29 -04:00
tlan.c tlan: cancel work at remove path 2013-04-16 16:43:34 -04:00
tlan.h