You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
5 years ago
..
adm5120 kernel: bump 3.18 to 3.18.133 5 years ago
adm8668 kernel: bump 3.18 to 3.18.133 5 years ago
apm821xx apm821xx: dts overhaul 5 years ago
ar7 kernel: bump 4.9 to 4.9.153 5 years ago
ar71xx kernel: bump 4.14 to 4.14.97 5 years ago
arc770 treewide: use wpad-basic for not small flash targets 6 years ago
archs38 treewide: use wpad-basic for not small flash targets 6 years ago
armvirt kernel: bump 4.14 to 4.14.77 6 years ago
at91 kernel: Build: Split kmod-regmap 5 years ago
ath25 kernel: bump 4.14 to 4.14.79 6 years ago
ath79 ath79: ag71xx: Fix tx queue timeouts during ifup 5 years ago
au1000 treewide: use wpad-basic for not small flash targets 6 years ago
bcm53xx bcm53xx: add first DTS changes queued for the Linux 5.1 5 years ago
brcm47xx kernel: bump 4.19 to 4.19.18 5 years ago
brcm63xx brcm63xx: dts: Unify naming of gpio-led nodes 5 years ago
brcm2708 brcm2708: fix early bootloader config restore 5 years ago
cns3xxx cns3xxx: don't use invalid mask value for clock events 5 years ago
gemini kernel: bump 4.19 to 4.19.18 5 years ago
generic kernel: rename symbol in kernel 4.19 config 5 years ago
imx6 imx6: add support for kernel 4.19 5 years ago
ipq40xx ipq40xx: fix ASUS RT-AC58U switch port numbering 5 years ago
ipq806x ipq806x: dts: Unify naming of gpio-led nodes 5 years ago
ixp4xx kernel: bump 4.9 to 4.9.154 5 years ago
kirkwood treewide: use wpad-basic for not small flash targets 6 years ago
lantiq kernel: bump 4.14 to 4.14.96 5 years ago
layerscape kernel: bump 4.14 to 4.14.97 5 years ago
malta malta: Add support for kernel 4.19 6 years ago
mcs814x kernel: bump 3.18 to 3.18.119 6 years ago
mediatek kernel: bump 4.14 to 4.14.97 5 years ago
mpc85xx kernel: bump 4.19 to 4.19.18 5 years ago
mvebu mvebu: backport upstream fixes for armada 37xx 5 years ago
mxs mxs: use generic sysinfo board detection 6 years ago
octeon octeon: fix typo in platform.sh 6 years ago
octeontx kernel: enable memory compaction 6 years ago
omap kernel: bump 4.14 to 4.14.77 6 years ago
omap24xx omap24xx: remove referece to not existing kmod-usb-musb-tusb6010 7 years ago
orion treewide: use wpad-basic for not small flash targets 6 years ago
oxnas oxnas: dts: Unify naming of gpio-led nodes 5 years ago
pistachio kernel: bump 4.14 to 4.14.91 6 years ago
ppc40x kernel: only optimized for size if small_flash 6 years ago
ppc44x kernel: only optimized for size if small_flash 6 years ago
ramips ramips: drop m25p,chunked-io from dts 5 years ago
rb532 kernel: bump 4.14 to 4.14.86 6 years ago
samsung kernel: Deactivate CONFIG_COMPAT_BRK 6 years ago
sunxi kernel: bump 4.19 to 4.19.18 5 years ago
uml treewide: use wpad-basic for not small flash targets 6 years ago
x86 x86: Add support for kernel 4.19 6 years ago
xburst kernel: bump 3.18 to 3.18.119 6 years ago
zynq kernel: Deactivate CONFIG_COMPAT_BRK 6 years ago
Makefile