openwrt/target/linux
Felix Fietkau 96eb3d883d cns3xxx: ethernet - resolve SMP issue
The combination of r35942 and r35952 causes an issue where eth_schedule_poll()
can be called from a different CPU between the call to napi_complete() and the
setting of cur_index which can break the rx ring accounting and cause ethernet
latency and/or ethernet stalls.  The issue can be easilly created by adding
a couple of artificial delays such as:

@@ -715,6 +715,7 @@ static int eth_poll(struct napi_struct *napi, int budget)

 	if (!received) {
 		napi_complete(napi);
+udelay(1000);
 		enable_irq(IRQ_CNS3XXX_SW_R0RXC);
 	}

@@ -727,6 +728,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
 	rx_ring->cur_index = i;

 	wmb();
+udelay(1000);
 	enable_rx_dma(sw);

 	return received;

This patch moves the setting of cur_index back up where it needs to be and
addresses the original corner case that r35942 was trying to catch in an
improved fashion by checking to see if the rx descriptor ring has become
full before interrupts were re-enabled so that a poll can be scheduled again
and avoid an rx stall caused by rx interrupts ceasing to fire again.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>

SVN-Revision: 39761
2014-02-27 23:02:37 +00:00
..
adm5120 kernel: remove obsolete yaffs options from target configs 2013-12-16 07:51:21 +00:00
adm8668 targets: prepare for supporting normal and initramfs images 2013-06-27 19:58:31 +00:00
amazon target: don't build jffs2 nor images by default 2013-06-05 20:58:59 +00:00
ar7 kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
ar71xx ar71xx: fix failsafe acces on several devices 2014-02-25 17:40:04 +00:00
at91 at91: fix typo in network file 2013-11-17 17:14:32 +00:00
atheros kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
au1000 au1000: make sysupgrade compatible with all file system types 2013-11-07 12:46:16 +00:00
avr32 kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
bcm53xx kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
brcm47xx brcm47xx: b44: some fixes in combination with the switch 2014-02-23 18:51:56 +00:00
brcm63xx brcm63xx: add preliminary support for 3.13 2014-02-24 15:54:12 +00:00
brcm2708 kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
cns3xxx cns3xxx: ethernet - resolve SMP issue 2014-02-27 23:02:37 +00:00
cns21xx kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
cobalt cobalt: do not build userland with support for mips1 2013-10-13 22:10:57 +00:00
ep93xx ep93xx: fix kmod-input-keyboard-ep93xx dependencies 2013-10-01 22:39:28 +00:00
gemini build: unify arm target cflags 2013-09-26 17:53:20 +00:00
generic kernel: add missing config symbol to 3.13 2014-02-24 15:53:58 +00:00
imx6 imx6: optimize for NEON FPU hardware 2014-02-27 22:41:40 +00:00
iop32x targets: prepare for supporting normal and initramfs images 2013-06-27 19:58:31 +00:00
ixp4xx kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
kirkwood kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
lantiq kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
malta kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
mcs814x build: unify arm target cflags 2013-09-26 17:53:20 +00:00
mpc52xx build: unify powerpc target cflags 2013-09-26 17:53:28 +00:00
mpc83xx kernel: remove obsolete yaffs options from target configs 2013-12-16 07:51:21 +00:00
mpc85xx kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
mvebu kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
mxs upgrade 3.13 targets to 3.13.2, refresh patches 2014-02-13 13:27:14 +00:00
octeon kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
omap use the default package set 2014-02-14 10:09:07 +00:00
omap24xx additional musb fixups 2014-02-09 16:14:30 +00:00
orion build: unify arm target cflags 2013-09-26 17:53:20 +00:00
ppc40x kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
ppc44x kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
pxa targets: prepare for supporting normal and initramfs images 2013-06-27 19:58:31 +00:00
ramips kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
rb532 kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
realview realview: fix zImage-initramfs installation 2014-02-27 00:12:53 +00:00
sibyte build: unify mips target cflags 2013-09-26 17:53:14 +00:00
sparc kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
sunxi target/sunxi: add dependency on sunxi to kmod-wdt-sunxi 2014-02-22 15:51:11 +00:00
uml target/uml: update README 2014-02-18 22:16:04 +00:00
x86 x86/rdc: remove old kernel config 2014-02-23 21:16:04 +00:00
x86_64 upgrade 3.13 targets to 3.13.2, refresh patches 2014-02-13 13:27:14 +00:00
xburst kernel: update 3.10 to 3.10.32 2014-02-23 10:59:40 +00:00
Makefile