lategoodbye / rpi-zero

Linux kernel source tree
Other
22 stars 3 forks source link

Broadcom genet fails to attach ethernet PHY on Raspberry Pi 4B sometimes #51

Closed starnight closed 3 years ago

starnight commented 3 years ago

I notice the Broadcom genet fails to attach ethernet PHY on Raspberry Pi 4B sometimes (more than 50%) when I test kernel 5.13-rc6, also tested 5.11.

It shows errors in the kernel message:

[   10.615778] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
...
[   11.585741] could not attach to PHY
[   11.585790] bcmgenet fd580000.ethernet eth0: failed to connect to PHY
[   11.615180] uart-pl011 fe201000.serial: no DMA platform data
[   11.623193] libphy: bcmgenet MII bus: probed
...
[   11.814783] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus

The full dmesg.

I also filed this bug to kernel's bugzilla as bug 213485.

According to the diagnostics in bug 213485, I found the unimac-mdio comes too late for genet, or system is too late to load mdio-bcm-unimac module.

lategoodbye commented 3 years ago

@starnight Thanks for reporting this issue. I'm having trouble to reproduce this issue, so i need more information about your setup:

What RPi 4 bootloader version are you using (vcgencmd bootloader_version)? What distribution do you use? What filesystem type is your rootfs? What is connected to your Raspberry Pi 4 (HDMI, USB)?

starnight commented 3 years ago

@starnight Thanks for reporting this issue. I'm having trouble to reproduce this issue, so i need more information about your setup:

What RPi 4 bootloader version are you using (vcgencmd bootloader_version)?

The firmwares are from RPi OS repository at tag 1.20210527. But, I make it boot U-Boot at tag v2021.04, then boot mainline kernel (aarch64).

What distribution do you use?

Endless OS

What filesystem type is your rootfs?

EXT4

What is connected to your Raspberry Pi 4 (HDMI, USB)?

Both HDMI and USB

lategoodbye commented 3 years ago

@starnight Could you please apply this patch, reproduce the issue and provide the dmesg?

lategoodbye commented 3 years ago

@starnight Please don't provide such ugly workaround patches to the netdev mailing list without helpful context. The results of my former request are more helpful.

lategoodbye commented 3 years ago

I think, i can close this because the discussion continues here: https://www.spinics.net/lists/netdev/msg749822.html