From: Baruch Siach <bar...@tkos.co.il> > I'm testing kernel v5.2-rc1 on my i.MX8MQ system, SolidRun Hummingboard > Pulse. The fec driver happens to probe before the gpio driver that we need for > the PHY reset. So fec_reset_phy() returns -EPROBE_DEFER. This triggers the > splat below when clk_ahb is disabled somewhere below the 'failed_reset' > label: > > [ 1.267218] enet1_root_clk already disabled > [ 1.271462] WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:924 > clk_core_disable+0xa0/0xa8 > [ 1.279396] CPU: 0 PID: 1 Comm: swapper/0 Not tainted > 5.2.0-rc1-00002-gb88a935c6e3f-dirty #1340 > [ 1.288105] Hardware name: SolidRun i.MX8MQ HummingBoard Pulse > (DT) > [ 1.294383] pstate: 60000085 (nZCv daIf -PAN -UAO) > [ 1.299184] pc : clk_core_disable+0xa0/0xa8 > [ 1.303376] lr : clk_core_disable+0xa0/0xa8 > [ 1.307565] sp : ffff00001003bad0 > [ 1.310886] x29: ffff00001003bad0 x28: ffff0000110c4000 > [ 1.316208] x27: ffff00001099f0b0 x26: ffff8000bd9f50a8 > [ 1.321530] x25: ffff00001099dfb0 x24: ffff0000110c4990 > [ 1.326852] x23: ffff8000bd9f4810 x22: ffff8000b8820000 > [ 1.332173] x21: ffff8000b949ec00 x20: ffff8000b91d0d00 > [ 1.337495] x19: ffff8000b91d0d00 x18: 0000000000000010 > [ 1.342816] x17: 0000000000000000 x16: 0000000000000000 > [ 1.348138] x15: ffffffffffffffff x14: 0720072007200720 > [ 1.353459] x13: 0720072007200720 x12: 0720072007200720 > [ 1.358780] x11: 0720072007200720 x10: 0720072007200720 > [ 1.364101] x9 : 0720072007200720 x8 : 0720072007200720 > [ 1.369423] x7 : 000000000000009b x6 : ffff8000ba020f00 > [ 1.374744] x5 : 0000000000000000 x4 : 0000000000000000 > [ 1.380065] x3 : 00000000ffffffff x2 : ffff000011008ce0 > [ 1.385386] x1 : dc292ba4797d3600 x0 : 0000000000000000 > [ 1.390708] Call trace: > [ 1.393162] clk_core_disable+0xa0/0xa8 > [ 1.397006] clk_core_disable_lock+0x20/0x38 > [ 1.401286] clk_disable+0x1c/0x28 > [ 1.404698] fec_probe+0x6a4/0x1248 > [ 1.408196] platform_drv_probe+0x50/0xa0 > [ 1.412214] really_probe+0xcc/0x280 > [ 1.415797] driver_probe_device+0x54/0xe8 > [ 1.419901] device_driver_attach+0x6c/0x78 > [ 1.424092] __driver_attach+0x68/0xe8 > [ 1.427851] bus_for_each_dev+0x70/0xc0 > [ 1.431695] driver_attach+0x20/0x28 > [ 1.435279] bus_add_driver+0x170/0x1d0 > [ 1.439123] driver_register+0x60/0x110 > [ 1.442967] __platform_driver_register+0x44/0x50 > [ 1.447683] fec_driver_init+0x18/0x20 > [ 1.451443] do_one_initcall+0x70/0x164 > [ 1.455288] kernel_init_freeable+0x1a0/0x234 > [ 1.459657] kernel_init+0x10/0x100 > [ 1.463156] ret_from_fork+0x10/0x18 > [ 1.466743] ---[ end trace 5e50e985bb318e6c ]--- > > On the following probe attempt after gpio probe, fec probes successfully, and > Ethernet is functional. So this is not a fatal error, but it is not nice. > > Any idea how to fix it? Below patch can fix the issue. You can try it. I will send the patch later.
@@ -3556,7 +3555,7 @@ fec_probe(struct platform_device *pdev) if (fep->reg_phy) regulator_disable(fep->reg_phy); failed_reset: - pm_runtime_put(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); failed_regulator: clk_disable_unprepare(fep->clk_ahb); > > Thanks, > baruch > > -- > > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbaruch. > siach.name%2Fblog%2F&data=02%7C01%7Cfugang.duan%40nxp.com% > 7C07955de3e2cb4aa8108108d6dec14e80%7C686ea1d3bc2b4c6fa92cd99c5 > c301635%7C0%7C0%7C636941319160064392&sdata=Spuf9ByyHaxTHk > nkCvwF0aRHeG49ymBQiCDQ7BTuSlU%3D&reserved=0 > ~. .~ Tk Open Systems > =}------------------------------------------------ooO--U--Ooo------------{= > - bar...@tkos.co.il - tel: +972.2.679.5364, > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tk > os.co.il&data=02%7C01%7Cfugang.duan%40nxp.com%7C07955de3e2cb > 4aa8108108d6dec14e80%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7 > C0%7C636941319160064392&sdata=GbuRBKbH%2FPX3VJgki8NKnDssD > v5hrrNdU4CjEYhSoys%3D&reserved=0 -