2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/drivers/net/ethernet/ti
Sebastian Siewior fd51cf1994 net/cpsw: don't rely only on netif_running() to check which device is active
netif_running() reports false before the ->ndo_stop() callback is
called. That means if one executes "ifconfig down" and the system
receives an interrupt before the interrupt source has been disabled we
hang for always for two reasons:
- we never disable the interrupt source because devices claim to be
  already inactive and don't feel responsible.
- since the ISR always reports IRQ_HANDLED the line is never deactivated
  because it looks like the ISR feels responsible.

This patch changes the logic in the ISR a little:
- If none of the status registers reports an active source (RX or TX,
  misc is ignored because it is not actived) we leave with IRQ_NONE.
- the interrupt is deactivated
- The first active network device is taken and napi is scheduled. If
  none are active (a small race window between ndo_down() and the
  interrupt the) then we leave and should not come back because the
  source is off.
  There is no need to schedule the second NAPI because both share the
  same dma queue.

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:11:49 -04:00
..
cpmac.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05: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
cpsw.c net/cpsw: don't rely only on netif_running() to check which device is active 2013-04-25 04:11:49 -04: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/davinci_cpdma: don't check for jiffies with interrupts 2013-04-25 04:11:49 -04:00
davinci_cpdma.h drivers: net: davinci_cpdma: acknowledge interrupt properly 2013-02-18 14:51:50 -05:00
davinci_emac.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-01 13:36:50 -04:00
davinci_mdio.c ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05: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
tlan.c tlan: cancel work at remove path 2013-04-16 16:43:34 -04:00
tlan.h