net: phylink: cleanup pcs code
Subsystems (4)
Russell King (Oracle)
maintainercover net: phylink: cleanup pcs code
Hi,
These two patches were part of the larger series for the mv88e6xxx phylink pcs conversion. As this is delayed, I've decided to send these two patches now.
drivers/net/phy/phylink.c | 69 ++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 30 deletions(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
PATCH 1/2 net: phylink: remove pcs_ops member
Remove the pcs_ops member from struct phylink, using the one stored in struct phylink_pcs instead.
--- drivers/net/phy/phylink.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-)
drivers/net/phy/phylink.c +19 -20
@@ -43,7 +43,6 @@ struct phylink {/* private: */ struct net_device *netdev;const struct phylink_mac_ops *mac_ops; -const struct phylink_pcs_ops *pcs_ops;struct phylink_config *config;struct phylink_pcs *pcs;struct device *dev;
@@ -779,8 +778,8 @@ static void phylink_mac_pcs_an_restart(struct phylink *pl)if (pl->link_config.an_enabled &&phy_interface_mode_is_8023z (pl->link_config.interface) &&phylink_autoneg_inband (pl->cur_link_an_mode)) { -if (pl->pcs_ops) - pl->pcs_ops->pcs_an_restart (pl->pcs); +if (pl->pcs) + pl->pcs->ops->pcs_an_restart (pl->pcs);else if (pl->config->legacy_pre_march2020) pl->mac_ops->mac_an_restart (pl->config); }
@@ -819,7 +818,6 @@ static void phylink_major_config(struct phylink *pl, bool restart,*/ if (pcs) { pl->pcs = pcs; - pl->pcs_ops = pcs->ops;if (!pl->phylink_disable_state && pl->cfg_link_an_mode ==MLO_AN_INBAND ) {
@@ -832,12 +830,12 @@ static void phylink_major_config(struct phylink *pl, bool restart,phylink_mac_config (pl, state); -if (pl->pcs_ops) { - err = pl->pcs_ops->pcs_config (pl->pcs, pl->cur_link_an_mode, - state->interface, - state->advertising, - !!(pl->link_config.pause & -MLO_PAUSE_AN )); +if (pl->pcs) { + err = pl->pcs->ops->pcs_config (pl->pcs, pl->cur_link_an_mode, + state->interface, + state->advertising, + !!(pl->link_config.pause & +MLO_PAUSE_AN ));if (err <0 )phylink_err (pl,"pcs_config failed: %pe\n" ,ERR_PTR (err));
@@ -869,7 +867,7 @@ static int phylink_change_inband_advert(struct phylink *pl)if (test_bit (PHYLINK_DISABLE_STOPPED , &pl->phylink_disable_state))return 0 ; -if (!pl->pcs_ops && pl->config->legacy_pre_march2020) { +if (!pl->pcs && pl->config->legacy_pre_march2020) {/* Legacy method */ phylink_mac_config (pl, &pl->link_config);phylink_mac_pcs_an_restart (pl);
@@ -886,10 +884,11 @@ static int phylink_change_inband_advert(struct phylink *pl)* restart negotiation if the pcs_config() helper indicates that * the programmed advertisement has changed. */ - ret = pl->pcs_ops->pcs_config (pl->pcs, pl->cur_link_an_mode, - pl->link_config.interface, - pl->link_config.advertising, - !!(pl->link_config.pause &MLO_PAUSE_AN )); + ret = pl->pcs->ops->pcs_config (pl->pcs, pl->cur_link_an_mode, + pl->link_config.interface, + pl->link_config.advertising, + !!(pl->link_config.pause & +MLO_PAUSE_AN ));if (ret <0 )return ret;
@@ -918,8 +917,8 @@ static void phylink_mac_pcs_get_state(struct phylink *pl, state->an_complete =0 ; state->link =1 ; -if (pl->pcs_ops) - pl->pcs_ops->pcs_get_state (pl->pcs, state); +if (pl->pcs) + pl->pcs->ops->pcs_get_state (pl->pcs, state);else if (pl->mac_ops->mac_pcs_get_state && pl->config->legacy_pre_march2020) pl->mac_ops->mac_pcs_get_state (pl->config, state);
@@ -992,8 +991,8 @@ static void phylink_link_up(struct phylink *pl, pl->cur_interface = link_state.interface; -if (pl->pcs_ops && pl->pcs_ops->pcs_link_up) - pl->pcs_ops->pcs_link_up (pl->pcs, pl->cur_link_an_mode, +if (pl->pcs && pl->pcs->ops->pcs_link_up) + pl->pcs->ops->pcs_link_up (pl->pcs, pl->cur_link_an_mode, pl->cur_interface, link_state.speed, link_state.duplex);
@@ -1115,7 +1114,7 @@ static void phylink_resolve(struct work_struct *w) }phylink_major_config (pl, false, &link_state); pl->link_config.interface = link_state.interface; - }else if (!pl->pcs_ops && pl->config->legacy_pre_march2020) { + }else if (!pl->pcs && pl->config->legacy_pre_march2020) {/* The interface remains unchanged, only the speed, * duplex or pause settings have changed. Call the * old mac_config() method to configure the MAC/PCS
Signature · 1 line
2.30.2
PATCH 2/2 net: phylink: disable PCS polling over major configuration
In reply to Russell King (Oracle)While we are performing a major configuration, there is no point having the PCS polling timer running. Stop it before we begin preparing for the configuration change, and restart it only once we've successfully completed the change.
--- drivers/net/phy/phylink.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)
drivers/net/phy/phylink.c +20 -10
@@ -758,6 +758,18 @@ static void phylink_resolve_flow(struct phylink_link_state *state) } } +static void phylink_pcs_poll_stop (struct phylink *pl) +{ +if (pl->cfg_link_an_mode ==MLO_AN_INBAND ) +del_timer (&pl->link_poll); +} + +static void phylink_pcs_poll_start (struct phylink *pl) +{ +if (pl->pcs->poll && pl->cfg_link_an_mode ==MLO_AN_INBAND ) +mod_timer (&pl->link_poll, jiffies +HZ ); +} +static void phylink_mac_config (struct phylink *pl,const struct phylink_link_state *state) {
@@ -789,6 +801,7 @@ static void phylink_major_config(struct phylink *pl, bool restart, const struct phylink_link_state *state) {struct phylink_pcs *pcs =NULL ; +bool pcs_changed = false;int err;phylink_dbg (pl,"major config %s\n" ,phy_modes (state->interface));
@@ -801,8 +814,12 @@ static void phylink_major_config(struct phylink *pl, bool restart, pcs);return ; } + + pcs_changed = pcs && pl->pcs != pcs; } +phylink_pcs_poll_stop (pl); +if (pl->mac_ops->mac_prepare) { err = pl->mac_ops->mac_prepare (pl->config, pl->cur_link_an_mode, state->interface);
@@ -816,18 +833,9 @@ static void phylink_major_config(struct phylink *pl, bool restart,/* If we have a new PCS, switch to the new PCS after preparing the MAC * for the change. */ -if (pcs) { +if (pcs_changed) pl->pcs = pcs; -if (!pl->phylink_disable_state && - pl->cfg_link_an_mode ==MLO_AN_INBAND ) { -if (pcs->poll) -mod_timer (&pl->link_poll, jiffies +HZ ); -else -del_timer (&pl->link_poll); - } - } -phylink_mac_config (pl, state);if (pl->pcs) {
@@ -852,6 +860,8 @@ static void phylink_major_config(struct phylink *pl, bool restart,phylink_err (pl,"mac_finish failed: %pe\n" ,ERR_PTR (err)); } + +phylink_pcs_poll_start (pl); }/*
Signature · 1 line
2.30.2
Re: [PATCH net-next 2/2] net: phylink: disable PCS polling over major configuration
Quoted 76 lines · Russell King (Oracle)
While we are performing a major configuration, there is no point having the PCS polling timer running. Stop it before we begin preparing for the configuration change, and restart it only once we've successfully completed the change.
Reviewed-by Andrew Lunn <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>--- drivers/net/phy/phylink.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)drivers/net/phy/phylink.c +18
-10@@ -758,6 +758,18 @@ static void phylink_resolve_flow(struct phylink_link_state *state) } } +static void phylink_pcs_poll_stop (struct phylink *pl) +{ +if (pl->cfg_link_an_mode ==MLO_AN_INBAND ) +del_timer (&pl->link_poll); +} + +static void phylink_pcs_poll_start (struct phylink *pl) +{ +if (pl->pcs->poll && pl->cfg_link_an_mode ==MLO_AN_INBAND ) +mod_timer (&pl->link_poll, jiffies +HZ ); +} +static void phylink_mac_config (struct phylink *pl,const struct phylink_link_state *state) {@@ -789,6 +801,7 @@ static void phylink_major_config(struct phylink *pl, bool restart, const struct phylink_link_state *state) {struct phylink_pcs *pcs =NULL ; +bool pcs_changed = false;int err;phylink_dbg (pl,"major config %s\n" ,phy_modes (state->interface));@@ -801,8 +814,12 @@ static void phylink_major_config(struct phylink *pl, bool restart, pcs);return ; } + + pcs_changed = pcs && pl->pcs != pcs; } +phylink_pcs_poll_stop (pl); +if (pl->mac_ops->mac_prepare) { err = pl->mac_ops->mac_prepare (pl->config, pl->cur_link_an_mode, state->interface);@@ -816,18 +833,9 @@ static void phylink_major_config(struct phylink *pl, bool restart,/* If we have a new PCS, switch to the new PCS after preparing the MAC * for the change. */ -if (pcs) { +if (pcs_changed) pl->pcs = pcs; -if (!pl->phylink_disable_state && - pl->cfg_link_an_mode ==MLO_AN_INBAND ) { -if (pcs->poll) -mod_timer (&pl->link_poll, jiffies +HZ ); -else -del_timer (&pl->link_poll); - } - } -phylink_mac_config (pl, state);if (pl->pcs) {
drivers/net/phy/phylink.c static void phylink_major_config(struct phylink *pl, bool restart, · line 867
Quoted 8 lines
drivers/net/phy/phylink.c +2
-0@@ -852,6 +860,8 @@ static void phylink_major_config(struct phylink *pl, bool restart,phylink_err (pl,"mac_finish failed: %pe\n" ,ERR_PTR (err)); } + +phylink_pcs_poll_start (pl); }/*
With latest net-next I got the following crash:
Jun 29 21:18:01 zcu104-1 kernel: [ 8.814176] macb ff0e0000.ethernet eth0: PHY [ff0e0000.ethernet-ffffffff:0c] driver [TI DP83867] (irq=POLL) Jun 29 21:18:01 zcu104-1 kernel: [ 8.814193] macb ff0e0000.ethernet eth0: configuring for phy/rgmii-id link mode Jun 29 21:18:01 zcu104-1 kernel: [ 8.814213] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Jun 29 21:18:01 zcu104-1 kernel: [ 8.881046] Mem abort info: Jun 29 21:18:01 zcu104-1 kernel: [ 8.893065] ESR = 0x0000000096000005 Jun 29 21:18:01 zcu104-1 kernel: [ 8.907481] EC = 0x25: DABT (current EL), IL = 32 bits Jun 29 21:18:01 zcu104-1 kernel: [ 8.913269] SET = 0, FnV = 0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.916586] EA = 0, S1PTW = 0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.919719] FSC = 0x05: level 1 translation fault Jun 29 21:18:01 zcu104-1 kernel: [ 8.924667] Data abort info: Jun 29 21:18:01 zcu104-1 kernel: [ 8.927539] ISV = 0, ISS = 0x00000005 Jun 29 21:18:01 zcu104-1 kernel: [ 8.931372] CM = 0, WnR = 0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.934339] user pgtable: 4k pages, 39-bit VAs, pgdp=00000000018b1000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.940778] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.949486] Internal error: Oops: 96000005 [#1] PREEMPT SMP Jun 29 21:18:01 zcu104-1 kernel: [ 8.955048] Modules linked in: uio_pdrv_genirq tsnep Jun 29 21:18:01 zcu104-1 kernel: [ 8.960014] CPU: 1 PID: 345 Comm: ifplugd Not tainted 5.19.0-rc3-zynqmp #5 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960023] Hardware name: TSN endpoint (DT) Jun 29 21:18:01 zcu104-1 kernel: [ 8.960027] pstate: a0000005 (NzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) Jun 29 21:18:01 zcu104-1 kernel: [ 8.960035] pc : phylink_major_config+0xf8/0x2f0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960052] lr : phylink_major_config+0xd4/0x2f0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960061] sp : ffffffc00a6139c0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960064] x29: ffffffc00a6139c0 x28: ffffff8005ddb180 x27: 0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960076] x26: 0000000000000000 x25: ffffff8005e40240 x24: 0000000000000010 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960087] x23: 0000000000000001 x22: 0000000000000000 x21: 0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960098] x20: ffffffc00a613a20 x19: ffffff8000b43a00 x18: 0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960109] x17: 0000000000000001 x16: 00008c294d41fe3e x15: 0230df5a173cf71e Jun 29 21:18:01 zcu104-1 kernel: [ 8.960121] x14: 0000000000000000 x13: 20726f6620676e69 x12: 72756769666e6f63 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960132] x11: 0000000000000001 x10: 000000000000002f x9 : ffffffc008944714 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960143] x8 : 00000000ffffffff x7 : 0a65646f6d206b6e x6 : 0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960154] x5 : 0000000000000001 x4 : ffffffc008982e28 x3 : 0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960165] x2 : 0000000000000001 x1 : 00000000fffffff5 x0 : 0000000000000000 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960176] Call trace: Jun 29 21:18:01 zcu104-1 kernel: [ 8.960179] phylink_major_config+0xf8/0x2f0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960188] phylink_mac_initial_config.constprop.0+0xb0/0x11c Jun 29 21:18:01 zcu104-1 kernel: [ 8.960197] phylink_start+0x50/0x260 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960205] macb_phylink_connect+0x64/0x130 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960214] macb_open+0x23c/0x350 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960222] __dev_open+0x11c/0x1b0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960231] __dev_change_flags+0x198/0x210 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960239] dev_change_flags+0x30/0x70 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960247] dev_ifsioc+0x2c4/0x4f0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960257] dev_ioctl+0x374/0x650 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960265] sock_do_ioctl.constprop.0+0xac/0xf0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960272] sock_ioctl+0x138/0x3b0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960278] __arm64_sys_ioctl+0xb4/0x100 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960289] invoke_syscall+0x5c/0x130 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960299] el0_svc_common.constprop.0+0xd4/0xf4 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960307] do_el0_svc+0x98/0xec Jun 29 21:18:01 zcu104-1 kernel: [ 8.960314] el0_svc+0x50/0xac Jun 29 21:18:01 zcu104-1 kernel: [ 8.960322] el0t_64_sync_handler+0x1ac/0x1b0 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960329] el0t_64_sync+0x18c/0x190 Jun 29 21:18:01 zcu104-1 kernel: [ 8.960340] Code: f9400a60 d63f0060 37f80620 f9400e60 (39402000) Jun 29 21:18:01 zcu104-1 kernel: [ 8.960345] ---[ end trace 0000000000000000 ]---
$ scripts/faddr2line vmlinux.o phylink_major_config+0xf8/0x2f0 phylink_major_config+0xf8/0x2f0: phylink_pcs_poll_start at /home/gerhard/git/linux/drivers/net/phy/phylink.c:769 (discriminator 6) (inlined by) phylink_major_config at /home/gerhard/git/linux/drivers/net/phy/phylink.c:864 (discriminator 6)
Crash can be fixed by reverting this commit. Any ideas?
Gerhard
'Re: [PATCH net-next 2/2] net: phylink: disable PCS polling over major configuration'
In reply to Russell King (Oracle)8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000004 [00000004] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: CPU: 0 PID: 5 Comm: kworker/u2:0 Not tainted 5.19.0-rc3 #21 Hardware name: Atmel SAMA5 Workqueue: events_unbound deferred_probe_work_func PC is at phylink_major_config+0x120/0x2c0 LR is at phylink_major_config+0xf4/0x2c0 pc : [<c0537498>] lr : [<c053746c>] psr: 60000013
sp : d0825be0 ip : c10294c0 fp : c098f0ec
r10: c185e180 r9 : 00000000 r8 : 00000001
r7 : 00000000 r6 : 00000000 r5 : d0825c08 r4 : c1848400
r3 : 00000000 r2 : 82f62a40 r1 : 00000000 r0 : c1848400
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 20004059 DAC: 00000051
Register r0 information: slab kmalloc-256 start c1848400 pointer offset 0 size 256 Register r1 information: NULL pointer
Register r2 information: non-paged memory
Register r3 information: NULL pointer
Register r4 information: slab kmalloc-256 start c1848400 pointer offset 0 size 256 Register r5 information: 2-page vmalloc region starting at 0xd0824000 allocated at kernel_clone+0xb8/0x368 Register r6 information: NULL pointer
Register r7 information: NULL pointer
Register r8 information: non-paged memory
Register r9 information: NULL pointer
Register r10 information: slab kmalloc-64 start c185e180 pointer offset 0 size 64 Register r11 information: non-slab/vmalloc memory
Register r12 information: slab task_struct start c10294c0 pointer offset 0
Process kworker/u2:0 (pid: 5, stack limit = 0x(ptrval))
Stack: (0xd0825be0 to 0xd0826000)
5be0: c185e078 c0536198 0000e188 c0d0324c c1848400 d0825c08 c185e188 c185e078 5c00: c098ea8c c053860c 00006248 00000000 00000000 00000008 00000000 00000000 5c20: 00000007 00000064 00000001 00000000 00000006 82f62a40 c1848400 00000000 5c40: c1862700 c05386a8 c0a5dab8 00000000 c115a400 00000000 c1862700 c07d4230 5c60: c115a400 c07d4264 c115a400 00000000 c1862700 c07d1184 00000000 c1862700 5c80: c115a400 c07d29bc 00000000 d0825ccc c0d0324c c0d5a708 c0a6bfe4 c0a6af44 5ca0: c185e180 00000000 00000004 00000000 00000000 00000000 00000000 82f62a40 5cc0: 00000000 00000004 c0d5a6f8 cfdf5a78 00000000 00000400 00000dc0 c0956f78 5ce0: c1001240 c01cdf84 00000000 00000dc0 a0000013 00000004 20000013 d0825d20 5d00: c0d0324c c05edfa4 cfde9bb8 c05f1f64 cfde9bb8 82f62a40 00000007 c1848540 5d20: 00000000 c0d0324c c0a21544 cfde94fc 00000000 c0d58d8c c1a491c0 c054cbb8 5d40: 00000000 60000013 c0d0324c 00000000 00000004 82f62a40 c1006000 c0956f78 5d60: 00000000 c1373800 c0d0324c c1848540 c1848558 c0956f78 c1006000 c0552c14 5d80: c0a2a990 0000001b 00000001 00000000 00000000 00000005 00000020 00000000 5da0: 00000000 00000000 00000000 00000000 00000000 00000000 c0552b10 c0552b0c 5dc0: c1848558 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5de0: 00000000 00ffffff 00000000 00000000 00000000 00000000 00000000 00000000 5e00: 00000000 00000000 00000000 00000000 00000000 00000060 00000040 00000000 5e20: 00000000 00000001 00000001 00000000 00000000 00000000 00000000 00000000 5e40: 00000000 82f62a40 c1373800 00000000 c0d2e2b0 c1373800 00000001 c0d28434 5e60: c100700d c052ce70 c1373800 00000000 c0d2e2c0 c04b5744 c1373800 c0d2e2c0 5e80: c1373800 c04b59a0 c0d57d0c c0d57d10 c1373800 c04b5a34 c0d2e2c0 d0825eec 5ea0: c1373800 c0d0324c 00000001 c04b5d68 00000000 d0825eec c04b5ce0 c04b3b00 5ec0: c1373800 c10b3c5c c1387eb4 82f62a40 c0d28434 c0d0324c c1373800 c1373844 5ee0: c0d28410 c04b55d8 c0d0b580 c1373800 00000001 82f62a40 c1373800 c1373800 5f00: c0d2b504 c0d28410 00000000 c04b47bc c1373800 c0d28404 c0d28404 c04b4c78 5f20: c0d28430 c100e500 00000040 c1007000 00000000 c012bbf0 c0d18ca0 c1006000 5f40: c100e500 c1006000 c1006018 c0d18ca0 c100e518 00000088 c0d3f567 c012c060 5f60: 00000000 c0a229e8 c10294c0 c101f940 c012be18 c100e500 c101f700 d0815e98 5f80: c10294c0 00000000 00000000 c0132774 c101f940 c01326ac 00000000 00000000 5fa0: 00000000 00000000 00000000 c0100148 00000000 00000000 00000000 00000000 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 phylink_major_config from phylink_mac_initial_config.constprop.19+0xa0/0xf4 phylink_mac_initial_config.constprop.19 from phylink_start+0x48/0x28c phylink_start from dsa_port_enable_rt+0x50/0x68 dsa_port_enable_rt from dsa_port_enable+0x1c/0x2cdsa_port_enable from dsa_port_setup+0xec/0x118dsa_port_setup from dsa_register_switch+0xa88/0xfa8 dsa_register_switch from ksz_switch_register+0x580/0x5e8 ksz_switch_register from ksz_spi_probe+0x100/0x150ksz_spi_probe from spi_probe+0x88/0xacspi_probe from really_probe+0xc0/0x298really_probe from __driver_probe_device+0x84/0xe4 __driver_probe_device from driver_probe_device+0x34/0xd4 driver_probe_device from __device_attach_driver+0x88/0xb4 __device_attach_driver from bus_for_each_drv+0x58/0xb8 bus_for_each_drv from __device_attach+0xf4/0x198__device_attach from bus_probe_device+0x84/0x8cbus_probe_device from deferred_probe_work_func+0x7c/0xa8 deferred_probe_work_func from process_one_work+0x1d4/0x3fc process_one_work from worker_thread+0x248/0x504worker_thread from kthread+0xc8/0xe4
kthread from ret_from_fork+0x14/0x2c
Exception stack(0xd0825fb0 to 0xd0825ff8) 5fa0: 00000000 00000000 00000000 00000000 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e12fff33 e2503000 ba00001f e594300c (e5d33004) ---[ end trace 0000000000000000 ]---
After this patch series, crash happens during ksz9477 booting. After reverting it ksz9477 booting works fine.
Signature · 1 line
2.36.1
Russell King (Oracle)
maintainerRe: 'Re: [PATCH net-next 2/2] net: phylink: disable PCS polling over major configuration'
Quoted 93 lines · Arun Ramadoss
8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000004 [00000004] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: CPU: 0 PID: 5 Comm: kworker/u2:0 Not tainted 5.19.0-rc3 #21 Hardware name: Atmel SAMA5 Workqueue: events_unbound deferred_probe_work_func PC is at phylink_major_config+0x120/0x2c0 LR is at phylink_major_config+0xf4/0x2c0 pc : [<c0537498>] lr : [<c053746c>] psr: 60000013sp :
d0825be0ip :c10294c0fp :c098f0ec
r10:c185e180r9 : 00000000 r8 : 00000001
r7 : 00000000 r6 : 00000000 r5 :d0825c08r4 :c1848400
r3 : 00000000 r2 :82f62a40r1 : 00000000 r0 :c1848400
Flags: nZCv IRQs on FIQs on ModeSVC_32ISA ARM Segment none
Control:10c53c7dTable: 20004059 DAC: 00000051
Register r0 information: slab kmalloc-256 startc1848400pointer offset 0 size 256 Register r1 information: NULL pointer
Register r2 information: non-paged memory
Register r3 information: NULL pointer
Register r4 information: slab kmalloc-256 startc1848400pointer offset 0 size 256 Register r5 information: 2-page vmalloc region starting at0xd0824000allocated atkernel_clone+0xb8/0x368Register r6 information: NULL pointer
Register r7 information: NULL pointer
Register r8 information: non-paged memory
Register r9 information: NULL pointer
Register r10 information: slab kmalloc-64 startc185e180pointer offset 0 size 64 Register r11 information: non-slab/vmalloc memory
Register r12 information: slabtask_structstartc10294c0pointer offset 0
Process kworker/u2:0 (pid: 5, stack limit = 0x(ptrval))Stack: (0xd0825be0 to 0xd0826000)5be0:
c185e078c05361980000e188c0d0324cc1848400d0825c08c185e188c185e0785c00:c098ea8cc053860c00006248 00000000 00000000 00000008 00000000 00000000 5c20: 00000007 00000064 00000001 00000000 0000000682f62a40c184840000000000 5c40:c1862700c05386a8c0a5dab800000000c115a40000000000c1862700c07d42305c60:c115a400c07d4264c115a40000000000c1862700c07d118400000000c18627005c80:c115a400c07d29bc00000000d0825cccc0d0324cc0d5a708c0a6bfe4c0a6af445ca0:c185e18000000000 00000004 00000000 00000000 00000000 0000000082f62a405cc0: 00000000 00000004c0d5a6f8cfdf5a7800000000 0000040000000dc0c0956f785ce0:c1001240c01cdf840000000000000dc0a000001300000004 20000013d0825d205d00:c0d0324cc05edfa4cfde9bb8c05f1f64cfde9bb882f62a4000000007c18485405d20: 00000000c0d0324cc0a21544cfde94fc00000000c0d58d8cc1a491c0c054cbb85d40: 00000000 60000013c0d0324c00000000 0000000482f62a40c1006000c0956f785d60: 00000000c1373800c0d0324cc1848540c1848558c0956f78c1006000c0552c145d80:c0a2a9900000001b00000001 00000000 00000000 00000005 00000020 00000000 5da0: 00000000 00000000 00000000 00000000 00000000 00000000c0552b10c0552b0c5dc0:c184855800000000 00000000 00000000 00000000 00000000 00000000 00000000 5de0: 0000000000ffffff00000000 00000000 00000000 00000000 00000000 00000000 5e00: 00000000 00000000 00000000 00000000 00000000 00000060 00000040 00000000 5e20: 00000000 00000001 00000001 00000000 00000000 00000000 00000000 00000000 5e40: 0000000082f62a40c137380000000000c0d2e2b0c137380000000001c0d284345e60:c100700dc052ce70c137380000000000c0d2e2c0c04b5744c1373800c0d2e2c05e80:c1373800c04b59a0c0d57d0cc0d57d10c1373800c04b5a34c0d2e2c0d0825eec5ea0:c1373800c0d0324c00000001c04b5d6800000000d0825eecc04b5ce0c04b3b005ec0:c1373800c10b3c5cc1387eb482f62a40c0d28434c0d0324cc1373800c13738445ee0:c0d28410c04b55d8c0d0b580c13738000000000182f62a40c1373800c13738005f00:c0d2b504c0d2841000000000c04b47bcc1373800c0d28404c0d28404c04b4c785f20:c0d28430c100e50000000040c100700000000000c012bbf0c0d18ca0c10060005f40:c100e500c1006000c1006018c0d18ca0c100e51800000088c0d3f567c012c0605f60: 00000000c0a229e8c10294c0c101f940c012be18c100e500c101f700d0815e985f80:c10294c000000000 00000000c0132774c101f940c01326ac00000000 00000000 5fa0: 00000000 00000000 00000000c010014800000000 00000000 00000000 00000000 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000phylink_major_configfrom phylink_mac_initial_config.constprop.19+0xa0/0xf4 phylink_mac_initial_config.constprop.19 fromphylink_start+0x48/0x28cphylink_startfromdsa_port_enable_rt+0x50/0x68dsa_port_enable_rtfromdsa_port_enable+0x1c/0x2cdsa_port_enablefromdsa_port_setup+0xec/0x118dsa_port_setupfromdsa_register_switch+0xa88/0xfa8dsa_register_switchfromksz_switch_register+0x580/0x5e8ksz_switch_registerfromksz_spi_probe+0x100/0x150ksz_spi_probefromspi_probe+0x88/0xacspi_probefromreally_probe+0xc0/0x298really_probefrom__driver_probe_device+0x84/0xe4__driver_probe_devicefromdriver_probe_device+0x34/0xd4driver_probe_devicefrom__device_attach_driver+0x88/0xb4__device_attach_driverfrombus_for_each_drv+0x58/0xb8bus_for_each_drvfrom__device_attach+0xf4/0x198__device_attachfrombus_probe_device+0x84/0x8cbus_probe_devicefromdeferred_probe_work_func+0x7c/0xa8deferred_probe_work_funcfromprocess_one_work+0x1d4/0x3fcprocess_one_workfromworker_thread+0x248/0x504worker_threadfromkthread+0xc8/0xe4
kthread fromret_from_fork+0x14/0x2cException stack(0xd0825fb0 to 0xd0825ff8) 5fa0: 00000000 00000000 00000000 00000000 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e12fff33 e2503000 ba00001f e594300c (e5d33004) ---[ end trace 0000000000000000 ]---
Quoted 2 lines
After this patch series, crash happens during ksz9477 booting. After reverting it ksz9477 booting works fine.
Fix already submitted by Vladimir. Thanks for reporting.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 27 Jun 2022 12:44:16 +0100 you wrote:
Hi,
These two patches were part of the larger series for the mv88e6xxx phylink pcs conversion. As this is delayed, I've decided to send these two patches now.
drivers/net/phy/phylink.c | 69 ++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 30 deletions(-)
Here is the summary with links:
- [net-next,1/2] net: phylink: remove pcs_ops member
https://git.kernel.org/netdev/net-next/c/4f1dd48f4031 - [net-next,2/2] net: phylink: disable PCS polling over major configuration https://git.kernel.org/netdev/net-next/c/bfac8c490d60
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html