-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Unplug of ethernet cable is not detected #2937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also reported here: |
Hi Team, I am not able to replicate the issue with the following system information. Update me if I am missing anything. System:
Thanks & Regards, |
It would be interesting to know if the problem is showing for anyone using the latest kernel (4.19) |
Hi Team,
I would like to know does anyone working on this issue?
Regards,
Sudhamani.
|
I think @JamesH65 answered your question before you asked it - we don't work on problems unless we know they exist. |
The problem is still there with 4.19.58 |
I'm seeing this problem on my Raspberry Pi 3 B+ as well. I noticed it when power cycling a small switch with four RPi's (three 3B's, one 3B+) connected caused all but the RPi3+ to request a new DHCP lease (as was the intent).
|
Hi, This problem is occurring so rarely on the following kernel Anyone working on this isse? Regards, |
Still present in 4.19.93-v7+ |
@brubbel Have you got a patch that shows that change in the driver? |
@JamesH65 has anyone been able to resolve this issue. This is still a problem on 5.4 kernels. |
FWIW, I did not patch the driver but use a daemon script to detect this and restart the driver. Never seen the issue since then (on quite a lot of RPI's), so I don't know if the root problem has been resolved or not. Poll LAN controller link status:
Then compare with If those two disagree, reset LAN controller:
|
This is just a quick update to say that I can reproduce the problem and am looking for the right solution. As a workaround you could try putting "ethtool -d eth0" in /etc/rc.local (or running "sudo ethtool -d eth0" manually), and see if the carrier tracking is correct from then on, or if it reverts to the bad state after a while. |
If I remember correctly this occurs only once. After reset of the LAN78XX device all goes well. |
Does that mean you will try my workaround instead of your script? |
It helps until the interface is taken down. Boot system with cable in. However Remove Cable /sys/class/net/eth0/carrier never goes back to a "1" And the interface is dead until it is reset. When resetting the USB interface, it has to happen when the cable is unplugged for it to work properly. |
Thanks - that's a useful test case. |
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
The carrier status disconnect is caused by the loss of interrupts from the PHY, which in turn is caused by resetting the MAC's view of the PHY interrupt status while an interrupt is pending. Until the lan78xx driver sees the interrupt status bit in the MAC it won't forward the interrupt to the PHY driver, and until it does that no further PHY interrupts will be generated.
The fix is in rpi-5.4.y and rpi-5.10.y, and will appear in future kernel builds. |
Duplicates of this bug: |
The patch mentioned above is in the current rpi-update kernel, which has just switched to rpi-5.10.y. |
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
Tested with Kernel built from latest 5.4.83, everything looks to be operating correctly. Thanks. |
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: raspberrypi/linux#2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: raspberrypi/linux#2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
Describe the bug
If RPI is started with unplugged ethernet cable, after full boot it correctly detects that ethernet cable was connected or disconnected, e.g.
/sys/class/net/eth0/carrier
is changing content.If RPI is started with plugged ethernet cable, it always responds that cable is connected.
To reproduce
Expected behaviour
/sys/class/net/eth0/carrier
content should be0
Actual behaviour
unplug of ethernet is not detected but on ethernet card yellow light is switched off.
/sys/class/net/eth0/carrier
content is1
System
RPI3 model B+
cat /etc/rpi-issue
)?vcgencmd version
)?uname -a
)?Logs
If applicable, add the relevant output from
dmesg
or similar.Additional context
Add any other relevant context for the problem.
The text was updated successfully, but these errors were encountered: