openwrt/target/linux
Sven Eckelmann ac4a21141a ath79: ag71xx: Disable napi related interrupts during probe
ag71xx_probe is registering ag71xx_interrupt as handler for the gmac0/gmac1
interrupts. The handler is trying to use napi_schedule to handle the
processing of packets. But the netif_napi_add for this device is
called a lot later in ag71xx_probe.

It can therefore happen that a still running gmac0/gmac1 is triggering the
interrupt handler with a bit from AG71XX_INT_POLL set in
AG71XX_REG_INT_STATUS. The handler will then call napi_schedule and the
napi code will crash the system because the ag->napi is not yet
initialized:

  libphy: Fixed MDIO Bus: probed
  CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 81373408
  Oops[#1]:
  CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.152 #0
  $ 0   : 00000000 00000001 00000000 8280bf28
  $ 4   : 82a98cb0 00000000 81620000 00200140
  $ 8   : 00000000 00000000 74657272 7570743a
  $12   : 0000005b 8280bdb9 ffffffff ffffffff
  $16   : 00000001 82a98cb0 00000000 8280bf27
  $20   : 8280bf28 81620000 ffff8b00 8280bf30
  $24   : 00000000 8125af9c
  $28   : 82828000 8280bed8 81610000 81373408
  Hi    : 00005fff
  Lo    : 2e48f657
  epc   : 00000000 0x0
  ra    : 81373408 __napi_poll+0x3c/0x11c
  Status: 1100dc03 KERNEL EXL IE
  Cause : 00800008 (ExcCode 02)
  BadVA : 00000000
  PrId  : 00019750 (MIPS 74Kc)
  Modules linked in:
  Process swapper (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
  Stack : ffff8afb ffff8afa 81620000 00200140 00000000 82a98cb0 00000008 0000012c
          81625620 81373684 ffffffff ffffffff ffffffef 00000008 816153d8 81620000
          815b0d60 815bbd54 00000000 81753700 8280bf28 8280bf28 8280bf30 8280bf30
          81753748 00000008 00000003 00000004 0000000c 00000100 3fffffff 8175373c
          816059f0 814ddb48 00000001 8160ab30 81615488 810618bc 00000006 00000000
          ...
  Call Trace:

  [<81373684>] net_rx_action+0xfc/0x26c
  [<814ddb48>] __do_softirq+0x118/0x2ec
  [<810618bc>] handle_percpu_irq+0x50/0x80
  [<8125ab8c>] plat_irq_dispatch+0x94/0xc8
  [<81004e98>] handle_int+0x138/0x144

  Code: (Bad address in epc)

  ---[ end trace a60d797432b656b2 ]---

The gmcc0/gmac1 must be brought in a state in which it doesn't signal a
AG71XX_INT_POLL related status bits as interrupt before registering the
interrupt handler. ag71xx_hw_start will take care of re-initializing the
AG71XX_REG_INT_ENABLE.

Fixes: f529a37420 ("surprise :p")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-10-23 18:50:31 +02:00
..
apm821xx apm821xx: WNDAP6X0: add missed uci-default for compat 2021-10-22 21:25:18 +02:00
arc770 kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
archs38 kernel: Add missing kernel config options 2021-09-13 13:04:21 +02:00
armvirt armvirt: enable MMIO_CMDLINE_DEVICES for firecracker support 2021-10-12 19:22:08 -10:00
at91 kernel: move some drm symbols to generic config 2021-06-13 23:30:10 +02:00
ath25 kernel: bump 5.4 to 5.4.154 2021-10-21 00:17:36 +02:00
ath79 ath79: ag71xx: Disable napi related interrupts during probe 2021-10-23 18:50:31 +02:00
bcm27xx kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
bcm47xx bcm47xx: add kernel 5.10 support 2021-10-21 17:38:17 +02:00
bcm53xx bcm53xx: bridge all LAN ports on Linksys EA9500 2021-10-22 13:46:22 +02:00
bcm63xx kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
bcm4908 kernel: bump 5.4 to 5.4.154 2021-10-21 00:17:36 +02:00
bmips kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
gemini gemini: splash banner on framebuffer console 2021-10-10 16:44:15 +02:00
generic kernel: backport GPIO LED patch for MT7530 2021-10-23 18:50:31 +02:00
imx6 kernel: 5.10: add missing symbols 2021-10-05 23:54:18 +02:00
ipq40xx ipq40xx: MR33: Fix LP5562 LED driver probe 2021-10-23 18:50:25 +02:00
ipq806x ipq806x: remove obsolete Kernel 5.4 2021-10-02 18:15:23 +02:00
ipq807x kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21 2021-09-09 20:24:12 +02:00
kirkwood kirkwood: switch to kernel 5.10 2021-10-09 18:44:55 +02:00
lantiq kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
layerscape layerscape: Fix build in dtb 2021-10-22 22:12:24 +02:00
malta malta: remove obsolete Kernel 5.4 2021-10-02 18:13:46 +02:00
mediatek kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
mpc85xx mpc85xx: switch to Kernel 5.10 2021-10-05 23:54:48 +02:00
mvebu mvebu: mochabin: correct LED labels in DTS 2021-10-09 19:27:11 +02:00
mxs treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
octeon kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
octeontx kernel: Deactivate some ARM64 errata workarounds 2021-10-03 01:13:18 +02:00
omap kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
oxnas kernel: bump 5.10 to 5.10.72 2021-10-10 00:09:22 +01:00
pistachio kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
ramips kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
realtek kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
rockchip rockchip: rename "Rock Pi 4" to "Rock Pi 4A" 2021-10-10 00:57:56 +02:00
sunxi kernel: Deactivate some ARM64 errata workarounds 2021-10-03 01:13:18 +02:00
tegra tegra: switch to kernel 5.10 2021-10-18 21:32:36 +02:00
uml treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
x86 kernel: bump 5.10 to 5.10.73 2021-10-21 00:17:36 +02:00
zynq zynq: switch to kernel 5.10 2021-10-17 14:13:22 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00