Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes-for-stm32-dwmac-driver-fails-to-probe'

Christophe Roullier says:

====================
Fixes for stm32-dwmac driver fails to probe

Mark Brown found issue during stm32-dwmac probe:

For the past few days networking has been broken on the Avenger 96, a
stm32mp157a based platform. The stm32-dwmac driver fails to probe:

<6>[ 1.894271] stm32-dwmac 5800a000.ethernet: IRQ eth_wake_irq not found
<6>[ 1.899694] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found
<6>[ 1.905849] stm32-dwmac 5800a000.ethernet: IRQ sfty not found
<3>[ 1.912304] stm32-dwmac 5800a000.ethernet: Unable to parse OF data
<3>[ 1.918393] stm32-dwmac 5800a000.ethernet: probe with driver stm32-dwmac failed with error -75

which looks a bit odd given the commit contents but I didn't look at the
driver code at all.

Full boot log here:

https://lava.sirena.org.uk/scheduler/job/467150

A working equivalent is here:

https://lava.sirena.org.uk/scheduler/job/466518

I delivered 2 fixes to solve issue.
====================

Link: https://patch.msgid.link/20240701064838.425521-1-christophe.roullier@foss.st.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

+7 -2
+7 -2
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
··· 206 206 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; 207 207 const u32 clk_rate = clk_get_rate(dwmac->clk_eth_ck); 208 208 209 + if (!dwmac->enable_eth_ck) 210 + return 0; 211 + 209 212 switch (plat_dat->mac_interface) { 210 213 case PHY_INTERFACE_MODE_MII: 211 214 case PHY_INTERFACE_MODE_GMII: ··· 435 432 dwmac->mode_mask = SYSCFG_MP1_ETH_MASK; 436 433 err = of_property_read_u32_index(np, "st,syscon", 2, &dwmac->mode_mask); 437 434 if (err) { 438 - if (dwmac->ops->is_mp13) 435 + if (dwmac->ops->is_mp13) { 439 436 dev_err(dev, "Sysconfig register mask must be set (%d)\n", err); 440 - else 437 + } else { 441 438 dev_dbg(dev, "Warning sysconfig register mask not set\n"); 439 + err = 0; 440 + } 442 441 } 443 442 444 443 return err;