1
0
Fork 0
alistair23-linux/drivers/net/ethernet/freescale
Christophe Leroy f8b39039cb net: fs_enet: do not call phy_stop() in interrupts
In case of TX timeout, fs_timeout() calls phy_stop(), which
triggers the following BUG_ON() as we are in interrupt.

[92708.199889] kernel BUG at drivers/net/phy/mdio_bus.c:482!
[92708.204985] Oops: Exception in kernel mode, sig: 5 [#1]
[92708.210119] PREEMPT
[92708.212107] CMPC885
[92708.214216] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G        W       4.9.61 #39
[92708.223227] task: c60f0a40 task.stack: c6104000
[92708.227697] NIP: c02a84bc LR: c02a947c CTR: c02a93d8
[92708.232614] REGS: c6105c70 TRAP: 0700   Tainted: G        W        (4.9.61)
[92708.241193] MSR: 00021032 <ME,IR,DR,RI>[92708.244818]   CR: 24000822  XER: 20000000
[92708.248767]
GPR00: c02a947c c6105d20 c60f0a40 c62b4c00 00000005 0000001f c069aad8 0001a688
GPR08: 00000007 00000100 c02a93d8 00000000 000005fc 00000000 c6213240 c06338e4
GPR16: 00000001 c06330d4 c0633094 00000000 c0680000 c6104000 c6104000 00000000
GPR24: 00000200 00000000 ffffffff 00000004 00000078 00009032 00000000 c62b4c00
NIP [c02a84bc] mdiobus_read+0x20/0x74
[92708.281517] LR [c02a947c] kszphy_config_intr+0xa4/0xc4
[92708.286547] Call Trace:
[92708.288980] [c6105d20] [c6104000] 0xc6104000 (unreliable)
[92708.294339] [c6105d40] [c02a947c] kszphy_config_intr+0xa4/0xc4
[92708.300098] [c6105d50] [c02a5330] phy_stop+0x60/0x9c
[92708.305007] [c6105d60] [c02c84d0] fs_timeout+0xdc/0x110
[92708.310197] [c6105d80] [c035cd48] dev_watchdog+0x268/0x2a0
[92708.315593] [c6105db0] [c0060288] call_timer_fn+0x34/0x17c
[92708.321014] [c6105dd0] [c00605f0] run_timer_softirq+0x21c/0x2e4
[92708.326887] [c6105e50] [c001e19c] __do_softirq+0xf4/0x2f4
[92708.332207] [c6105eb0] [c001e3c8] run_ksoftirqd+0x2c/0x40
[92708.337560] [c6105ec0] [c003b420] smpboot_thread_fn+0x1f0/0x258
[92708.343405] [c6105ef0] [c003745c] kthread+0xbc/0xd0
[92708.348217] [c6105f40] [c000c400] ret_from_kernel_thread+0x5c/0x64
[92708.354275] Instruction dump:
[92708.357207] 7c0803a6 bbc10018 38210020 4e800020 7c0802a6 9421ffe0 54290024 bfc10018
[92708.364865] 90010024 7c7f1b78 81290008 552902ee <0f090000> 3bc3002c 7fc3f378 90810008
[92708.372711] ---[ end trace 42b05441616fafd7 ]---

This patch moves fs_timeout() actions into an async worker.

Fixes: commit 48257c4f16 ("Add fs_enet ethernet network driver, for several embedded platforms")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-17 15:44:16 -05:00
..
dpaa dpaa_eth: fix error return code in dpaa_eth_probe() 2017-11-08 13:24:44 +09:00
fman fsl/fman_port: mark expected switch fall-throughs 2017-11-11 18:50:33 +09:00
fs_enet net: fs_enet: do not call phy_stop() in interrupts 2018-01-17 15:44:16 -05:00
Kconfig Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:56:15 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fec.h net: fec: Let fec_ptp have its own interrupt routine 2017-11-08 10:36:11 +09:00
fec_main.c net: fec: free/restore resource in related probe error pathes 2018-01-05 11:19:11 -05:00
fec_mpc52xx.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
fec_mpc52xx.h
fec_mpc52xx_phy.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
fec_ptp.c net: fec: Let fec_ptp have its own interrupt routine 2017-11-08 10:36:11 +09:00
fsl_pq_mdio.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
gianfar.c gianfar: Disable EEE autoneg by default 2017-12-08 13:23:01 -05:00
gianfar.h Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
gianfar_ethtool.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
gianfar_ptp.c net: gianfar_ptp: move set_fipers() to spinlock protecting area 2018-01-10 14:54:13 -05:00
ucc_geth.c net/ethernet/freescale: fix warning for ucc_geth 2017-09-18 14:56:34 -07:00
ucc_geth.h QE: Move QE from arch/powerpc to drivers/soc 2015-12-22 17:12:56 -06:00
ucc_geth_ethtool.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
xgmac_mdio.c net/fsl: use of_property_read_bool 2016-08-08 16:15:00 -07:00