openwrt/target/linux
Petr Štetiar 5fd68d60e4 ath79: ag71xx: Fix tx queue timeouts during ifup
On ath79 and UBNT Bullet M XW (ar9342) I was experiencing weird issues during
network setup[1] which I was able to reproduce easily with following commands:

 uci set network.lan.ipaddr='192.168.1.20'
 uci commit network
 ifup lan

Which resulted after some time in:

 ...
 WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:461 dev_watchdog+0x16c/0x280
 NETDEV WATCHDOG: eth0 (ag71xx): transmit queue 0 timed out
 ...

Sometimes I wasn't able to use networking anymore, sometimes it was enough to
just ifdown/ifup lan and network was backup. On ar71xx it was all working just
fine.

I've found out, that it was happening because ag71xx_poll() wasn't called, thus
the TX queue wasn't emptied. The ag71xx_poll() is being called from napi
hrtimer, which is enabled by napi_schedule() in ar71xx_interrupt(), but since
no interrupts were ever fired again after ag71xx_stop() was called, it was
always leading to tx queue timeouts:

 *** ag71xx_hard_start_xmit()
 eth0: packet injected into TX queue
 eth0: raw intr=00000001 TXPS POLL
 eth0: enable polling mode
 eth0: processing TX ring, flush=no
 eth0: disable polling mode, rx=1, tx=1,limit=32

 ( `ifup lan done here` )

 *** ag71xx_stop()
 *** ag71xx_open()
 *** ag71xx_hw_enable()
 IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
 IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 *** ag71xx_hard_start_xmit()
 eth0: packet injected into TX queue
 *** ag71xx_hard_start_xmit()
 eth0: packet injected into TX queue
 ...
 WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:320 dev_watchdog+0x164/0x274

So I've looked at ag71xx_stop() in ar71xx, added the missing bits to ath79 and
fixed this issue.

1. https://github.com/openwrt/openwrt/pull/1635#issuecomment-448638246

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[move ag->link before ag71xx_hw_disable to retain ordering as original]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-02-07 14:19:46 +01:00
..
adm5120 kernel: bump 3.18 to 3.18.133 2019-01-28 18:17:32 +01:00
adm8668 kernel: bump 3.18 to 3.18.133 2019-01-28 18:17:32 +01:00
apm821xx apm821xx: dts overhaul 2019-01-24 15:53:03 +01:00
ar7 kernel: bump 4.9 to 4.9.153 2019-01-28 18:17:32 +01:00
ar71xx kernel: bump 4.14 to 4.14.97 2019-02-01 11:41:00 +01:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt kernel: bump 4.14 to 4.14.77 2018-10-19 10:01:57 +02:00
at91 kernel: Build: Split kmod-regmap 2019-01-27 00:16:13 +01:00
ath25 kernel: bump 4.14 to 4.14.79 2018-11-05 16:00:00 +01:00
ath79 ath79: ag71xx: Fix tx queue timeouts during ifup 2019-02-07 14:19:46 +01:00
au1000 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
bcm53xx bcm53xx: add first DTS changes queued for the Linux 5.1 2019-02-01 07:09:27 +01:00
brcm47xx kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
brcm63xx brcm63xx: dts: Unify naming of gpio-led nodes 2019-02-05 16:28:12 +01:00
brcm2708 brcm2708: fix early bootloader config restore 2019-02-06 07:39:39 +02:00
cns3xxx cns3xxx: don't use invalid mask value for clock events 2019-01-28 18:17:32 +01:00
gemini kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
generic kernel: rename symbol in kernel 4.19 config 2019-02-07 13:06:23 +01:00
imx6 imx6: add support for kernel 4.19 2019-01-28 18:17:32 +01:00
ipq40xx ipq40xx: fix ASUS RT-AC58U switch port numbering 2019-02-05 16:28:12 +01:00
ipq806x ipq806x: dts: Unify naming of gpio-led nodes 2019-01-24 15:53:03 +01:00
ixp4xx kernel: bump 4.9 to 4.9.154 2019-02-01 11:41:00 +01:00
kirkwood treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
lantiq kernel: bump 4.14 to 4.14.96 2019-01-28 18:17:32 +01:00
layerscape kernel: bump 4.14 to 4.14.97 2019-02-01 11:41:00 +01:00
malta malta: Add support for kernel 4.19 2019-01-13 16:31:40 +01:00
mcs814x kernel: bump 3.18 to 3.18.119 2018-08-20 13:03:23 +02:00
mediatek kernel: bump 4.14 to 4.14.97 2019-02-01 11:41:00 +01:00
mpc85xx kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
mvebu mvebu: backport upstream fixes for armada 37xx 2019-01-27 00:16:14 +01:00
mxs mxs: use generic sysinfo board detection 2018-11-28 23:37:29 +01:00
octeon octeon: fix typo in platform.sh 2019-01-12 19:40:13 +01:00
octeontx kernel: enable memory compaction 2018-10-09 14:29:55 +02:00
omap kernel: bump 4.14 to 4.14.77 2018-10-19 10:01:57 +02:00
omap24xx omap24xx: remove referece to not existing kmod-usb-musb-tusb6010 2018-01-15 13:13:34 +01:00
orion treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
oxnas oxnas: dts: Unify naming of gpio-led nodes 2019-01-24 15:53:04 +01:00
pistachio kernel: bump 4.14 to 4.14.91 2019-01-07 17:09:06 +01:00
ppc40x kernel: only optimized for size if small_flash 2018-07-12 18:15:32 +02:00
ppc44x kernel: only optimized for size if small_flash 2018-07-12 18:15:32 +02:00
ramips ramips: drop m25p,chunked-io from dts 2019-02-05 19:37:30 +01:00
rb532 kernel: bump 4.14 to 4.14.86 2018-12-10 11:48:44 +01:00
samsung kernel: Deactivate CONFIG_COMPAT_BRK 2018-12-26 17:32:48 +01:00
sunxi kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
uml treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
x86 x86: Add support for kernel 4.19 2019-01-12 22:40:36 +01:00
xburst kernel: bump 3.18 to 3.18.119 2018-08-20 13:03:23 +02:00
zynq kernel: Deactivate CONFIG_COMPAT_BRK 2018-12-26 17:32:48 +01:00
Makefile