Re: [PATCH net v2] r8152: Use BMSR to detect the link state
From: Linmao Li
Date: Fri Oct 16 2026 - 03:19:08 EST
在 2026/10/15 0:10, Andrew Lunn 写道:
Hi Andrew,802.3 thinks this can happen, otherwise why make it latch?For those devices which are broken, double read the BMSR. The danger is,Could this actually happen?
somebody who quickly unplugs and replugs the cable is not going to get the
down notification. The dhcp client will not restart, so the old IP address will be
used, for the next hour to day, and the network is broken.
I think it would take several seconds for the link to go down and then come back up.
Wouldn't this issue occur only if the link transitions from up to down and back up before the driver processes the link-down event?
If i'm just going from port 7 to port 8 of my switch, it might happen.
Or i reconfigure my managed switch to change the port from one subnet
to another subnet. The RJ45 is not moved, it is just a configuration
change. The switch should do a down/up on its side to indicate
something has changed, and that needs to be reported to userspace so
dhcpcd gets a new IP address.
Andrew
Agreed, my replug numbers do not rule out those cases.
Option a) addresses only the speed regression. It keeps the existing
PLA_PHYSTATUS carrier detection and does not improve reporting of
short link drops that recover before the link work runs.
I plan to post a) as v3 for net next week, keeping that scope
explicit. Please let me know if you see a problem with this approach.
Thanks,
Linmao