android_kernel_motorola_sm6225/drivers/net/ethernet
Lennert Buytenhek 4945106d21 ksz884x: fix receive polling race condition
The ksz884x driver does receive processing in a custom tasklet, and
seems to be assuming that since it takes its private interface spinlock
with spin_lock_irq(), it won't be running concurrently with its own
interrupt handler, as it cannot be preempted by it, but since its
interrupt handler doesn't do any locking whatsoever, the receive
processing tasklet and interrupt handler can end up running concurrently
on different CPUs.

As a result of this, the ksz884x receive path ends up locking up fairly
easily, when the receive processing tasklet's reenabling of receive
interrupts (due to it being done with polling the receive ring) races
with the interrupt handler's disabling of receive interrupts (due to a
new receive interrupt coming in) resulting in the receive interrupt
being masked but the receive processing tasklet not being scheduled.

Fix this by making the ksz884x interrupt handler take its private
interface spinlock.  This requires upgrading the spin_lock() in the
transmit cleanup tasklet to a spin_lock_irq(), as otherwise the IRQ
handler can preempt transmit cleanup and deadlock the system, but
with those two changes, no more receive lockups have been observed.

Reported-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

----
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-19 12:44:45 -08:00
..
3com drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
8390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
adaptec drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
adi bfin_mac: remove __dev* attributes 2012-12-03 11:16:41 -08:00
aeroflex aeroflex: remove __dev* attributes 2012-12-03 11:16:41 -08:00
alteon drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
amd drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
apple net/apple: remove __dev* attributes 2012-12-03 11:16:54 -08:00
atheros drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
broadcom Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
brocade bna: Driver Version Updated to 3.1.2.1 2012-12-11 18:25:53 -05:00
cadence net/cadence: remove __dev* attributes 2012-12-03 11:16:54 -08:00
calxeda net: calxedaxgmac: ip align receive buffers 2012-11-07 03:51:14 -05:00
chelsio SCSI misc on 20121212 2012-12-13 19:20:31 -08:00
cirrus cs89x0 : packet reception not working 2012-08-31 15:48:56 -04:00
cisco drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
davicom net: dm9000: use io{read,write}*_rep accessors 2012-12-10 15:46:27 -05:00
dec drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
dlink Networking: Remove __dev* markings from the networking drivers 2012-12-03 15:35:28 -05:00
emulex be2net: fix wrong frag_idx reported by RX CQ 2012-12-18 16:18:39 -08:00
faraday net: ftgmac100/ftmac100: dont pull too much data 2012-07-18 09:40:53 -07:00
freescale net: fec: forbid FEC_PTP on SoCs that do not support 2012-12-18 16:26:18 -08:00
fujitsu drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
hp drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
i825xx i825xx: remove __dev* attributes 2012-12-03 11:16:12 -08:00
ibm drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
icplus drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
intel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
marvell drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
mellanox First batch of InfiniBand/RDMA changes for the 3.8 merge window: 2012-12-13 19:19:09 -08:00
micrel ksz884x: fix receive polling race condition 2012-12-19 12:44:45 -08:00
microchip enc28j60: remove __dev* attributes 2012-12-03 11:16:44 -08:00
myricom Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
natsemi drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
neterion drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
nuvoton nuvoton: remove __dev* attributes 2012-12-03 11:16:44 -08:00
nvidia forcedeth: remove __dev* attributes 2012-12-03 11:16:44 -08:00
nxp lpc_eth: remove __dev* attributes 2012-12-03 11:16:44 -08:00
octeon net/octeon_mgmt: remove __dev* attributes 2012-12-03 11:16:45 -08:00
oki-semi pch_gbe, ptp_pch: Fix the dependency direction between these drivers 2012-11-17 22:11:45 -05:00
packetengines drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
pasemi net/pasemi: remove __dev* attributes 2012-12-03 11:16:55 -08:00
qlogic qlcnic: update driver version 2012-12-19 12:42:48 -08:00
racal netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-08 18:46:38 -05:00
rdc drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
renesas net: sh_eth: Fix a typo - replace regist with register. 2012-11-03 15:37:35 -04:00
seeq seeq: remove __dev* attributes 2012-12-03 11:16:46 -08:00
sfc drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
sgi drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
silan drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
sis drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
smsc net: smc911x: use io{read,write}*_rep accessors 2012-12-11 12:49:53 -05:00
stmicro stmmac: fix platform driver unregistering 2012-12-14 13:14:07 -05:00
sun drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
tehuti tehuti: remove __dev* attributes 2012-12-03 11:16:53 -08:00
ti cpts: Fix build error caused by include of plat/clock.h 2012-12-14 13:17:57 -05:00
tile tilegx: request_irq with a non-null device name 2012-11-16 01:40:41 -05:00
toshiba drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
tundra drivers/net/ethernet/tundra/tsi108_eth.c: delete double assignment 2012-08-30 13:08:37 -04:00
via drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
wiznet net/wiznet: remove __dev* attributes 2012-12-03 11:16:56 -08:00
xilinx net/xilinx: remove __dev* attributes 2012-12-03 11:16:56 -08:00
xircom Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
xscale ixp4xx_eth: remove __dev* attributes 2012-12-03 11:16:53 -08:00
dnet.c net/ethernet: remove __dev* attributes 2012-12-03 11:16:56 -08:00
dnet.h
ethoc.c net/ethernet: remove __dev* attributes 2012-12-03 11:16:56 -08:00
fealnx.c drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
jme.c jme: remove __dev* attributes 2012-12-03 11:16:54 -08:00
jme.h jme: Fix FIFO flush issue 2012-02-22 14:44:41 -05:00
Kconfig net: mipsnet: Remove the MIPSsim Ethernet driver. 2012-09-24 16:47:23 -04:00
korina.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
lantiq_etop.c net/ethernet: remove __dev* attributes 2012-12-03 11:16:56 -08:00
Makefile net: mipsnet: Remove the MIPSsim Ethernet driver. 2012-09-24 16:47:23 -04:00
netx-eth.c ARM: netx: move platform_data definitions 2012-09-14 11:17:36 +02:00
s6gmac.c net/ethernet: remove __dev* attributes 2012-12-03 11:16:56 -08:00