Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.14k
stars
4.99k
forks
source link
LAN7800 // USB3 host hangs with 100mbit links #6336
There's different behaviour when setting up power management - for 1000mbit the driver enables only U1 acceptance, whilst for everything else (i.e. 100mbit) it enables both U1 and U2 acceptance. If one disables the latter path and only enable U1 acceptance for all link speeds, this hang doesn't occur.
Whilst superficially this might indicate that there's a bug in the LAN78xx driver, once failed it doesn't seem to be able to be recovered without a re-boot so my gut feeling is that it's something in the USB Host Controller driver that's failed :
usbreset of the LAN7800 doesn't recover
unplugging and re-plugging the LAN7800 doesn't recover
unplugging and re-plugging the USB3 hub doesn't recover
I've tried reproducing on a standard PC with USB3 but it doesn't occur. If I can find another ARM board with USB3 Ill re-test and update.
Describe the bug
With a Raspberry Pi 4 Model B I can reproducibly generate an ethernet hang using LAN7800 USB devices. (See steps listed)
Steps to reproduce the behaviour
Raspberry Pi Setup:
Connect a Raspberry pi 4 Model B to a USB3 hub with a LAN7800 device on a 5Gbps port
Boot a raspios 64-bit image (e.g. 2024-07-04-raspios-bookworm-arm64-lite.img)
Configure the LAN7800 to a known static IP using interfaces.d (in my case eth1 - 10.0.2.1)
install iperf3
Remote Host Setup :
Can be an arbitrary linux machine (in my case Debian 12 on a Dell Latitude Rugged 5420 laptop)
Configure the ethernet to a known static IP using interfaces.d (in my case eth1 - 10.0.2.230)
Do either :
install iperf3
start iperf3 in server mode :
RPI Test
On test setup here, this starts to fail within a couple of minutes, often as fast as 7 secs in.
Device (s)
Raspberry Pi 4 Mod. B
System
See above.
Logs
Additional context
Misc notes :
One of the critical elements is that the link needs to be at 100mb. Looking at the LAN78xx driver :
https://github.com/raspberrypi/linux/blob/789af262fb268b2006099a096faf4a383592ce1b/drivers/net/usb/lan78xx.c#L1466C1-L1467C1
There's different behaviour when setting up power management - for 1000mbit the driver enables only U1 acceptance, whilst for everything else (i.e. 100mbit) it enables both U1 and U2 acceptance. If one disables the latter path and only enable U1 acceptance for all link speeds, this hang doesn't occur.
Whilst superficially this might indicate that there's a bug in the LAN78xx driver, once failed it doesn't seem to be able to be recovered without a re-boot so my gut feeling is that it's something in the USB Host Controller driver that's failed :
I've tried reproducing on a standard PC with USB3 but it doesn't occur. If I can find another ARM board with USB3 Ill re-test and update.