Since commit d73a2156bdad ("net: phy: simplify phy_mac_interrupt and related functions") has droped the phy_queue in struct phy_device, and it is relocated into struct nxp_specific_data which will be private data of related phy_device. As a result, there will be no one to init the phy_queue before nxp phy config init, so drop the cancel_work_sync() in nxp_config_init(), otherwise, there will be warning calltrace like the following:
WARNING: CPU: 0 PID: 188 at kernel/workqueue.c:3037 __flush_work.isra.0+0x2b4/0x2e0 Modules linked in: nxp pfeng(O+) hse llce_core sch_fq_codel openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 fuse CPU: 0 PID: 188 Comm: systemd-udevd Tainted: G O 5.10.25-yocto-standard #1 Hardware name: Freescale S32G274 (DT) pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--) pc : __flush_work.isra.0+0x2b4/0x2e0 lr : __cancel_work_timer+0x134/0x1ac sp : ffffffc0127db290 x29: ffffffc0127db290 x28: 0000000000000000 x27: ffffff885f9ffce0 x26: ffffffc010c9cba8 x25: ffffff88002bc380 x24: 0000000000000001 x23: ffffffc0100629b0 x22: ffffffc01148bb60 x21: ffffff88002bc380 x20: ffffff8805a19208 x19: ffffff8805a19208 x18: 0000000000000000 x17: 0000000000000002 x16: 000033bd918e20a0 x15: 00cefe10e88b39bc x14: ffffffc010bfbc90 x13: 0000000000000354 x12: 00000000f5257d14 x11: 0000000000cefe10 x10: 0000000000000920 x9 : ffffffc010066608 x8 : ffffff88002bcd00 x7 : 0000000000003abf x6 : 000000000000b8f3 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000000000a0 x2 : 0000000000000000 x1 : 0000000000000011 x0 : 0000000000000000 Call trace: __flush_work.isra.0+0x2b4/0x2e0 __cancel_work_timer+0x134/0x1ac cancel_work_sync+0x20/0x30 nxp_config_init+0x2ec/0x3e4 [nxp] nxp_probe+0x80/0x100 [nxp] phy_probe+0x7c/0x1dc really_probe+0xf0/0x4b4 driver_probe_device+0x64/0xcc __device_attach_driver+0xb4/0x110 bus_for_each_drv+0x84/0xd4 __device_attach+0xe4/0x18c device_initial_probe+0x20/0x30 bus_probe_device+0xa4/0xb0 device_add+0x334/0x72c phy_device_register+0x64/0xb0 of_mdiobus_phy_device_register+0xd8/0x100 of_mdiobus_register_phy+0x10c/0x170 of_mdiobus_register+0x144/0x360 pfeng_mdio_register+0xcc/0x110 [pfeng] pfeng_drv_probe+0x1b8/0x2c0 [pfeng] pfeng_s32g_probe+0x528/0xad0 [pfeng] platform_drv_probe+0x60/0xb4 really_probe+0xf0/0x4b4 driver_probe_device+0x64/0xcc device_driver_attach+0xcc/0xd4 __driver_attach+0x90/0x130 bus_for_each_dev+0x7c/0xd0 driver_attach+0x30/0x3c bus_add_driver+0x114/0x200 driver_register+0x84/0x140 __platform_driver_register+0x54/0x60 pfeng_platform_driver_init+0x2c/0x1000 [pfeng] do_one_initcall+0x6c/0x2e0 do_init_module+0x60/0x27c load_module+0x1f9c/0x27d0 __do_sys_finit_module+0xb8/0xfc __arm64_sys_finit_module+0x2c/0x40 el0_svc_common.constprop.0+0x9c/0x1c0 do_el0_svc+0x78/0xa0 el0_svc+0x20/0x30 el0_sync_handler+0x1a4/0x1b0 el0_sync+0x174/0x180 ---[ end trace bbae33eae4d3e4e9 ]--- Besides, the comments on the phy_queue are modified to compatible with the codes. Signed-off-by: Zhantao Tang <zhantao.t...@windriver.com> --- drivers/net/phy/nxp/nxp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/phy/nxp/nxp.c b/drivers/net/phy/nxp/nxp.c index 786c26017b6e..8760c220d716 100644 --- a/drivers/net/phy/nxp/nxp.c +++ b/drivers/net/phy/nxp/nxp.c @@ -163,12 +163,9 @@ static int nxp_config_init(struct phy_device *phydev) /* Setup and queue a polling function: * - * The phy_queue is normally used to schedule the interrupt handler - * from interrupt context after an irq has been received. - * Here it is repurposed as scheduling mechanism for the poll function + * Here the phy_queue is to purposed as scheduling mechanism for the poll function */ if (((struct nxp_specific_data *)phydev->priv)->poll_setup == 0) { - cancel_work_sync(&(((struct nxp_specific_data *)phydev->priv)->phy_queue)); INIT_WORK(&(((struct nxp_specific_data *)phydev->priv)->phy_queue), poll); queue_work(system_power_efficient_wq, &(((struct nxp_specific_data *)phydev->priv)->phy_queue)); -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9704): https://lists.yoctoproject.org/g/linux-yocto/message/9704 Mute This Topic: https://lists.yoctoproject.org/mt/81911546/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-