summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorLinmao Li <lilinmao@kylinos.cn>2026-10-26 09:23:45 +0800
committerPaolo Abeni <pabeni@redhat.com>2026-10-29 12:08:10 +0100
commit85b4bc79dde77aadda0929a22f3532b208a3e1f8 (patch)
tree02469ea7a6633b88b090adc6878188fdd98ad6d3 /scripts/basic/split-include.c
parent829a09df899dcce860dcf5f70e09c1b2d7d425ab (diff)
downloadlinux-85b4bc79dde77aadda0929a22f3532b208a3e1f8.tar.gz
linux-85b4bc79dde77aadda0929a22f3532b208a3e1f8.zip
r8152: Use BMSR to detect the link state
r8152 detects carrier from PLA_PHYSTATUS without reading BMSR, so BMSR_LSTATUS can remain latched low after link up. Since commit f6f2e946aa4d ("net: mii: Fix the Speed display when the network cable is not connected"), the first speed query can then report SPEED_UNKNOWN, which applications such as NetworkManager may cache until the next carrier change. Use BMSR_LSTATUS in set_carrier() so a latched link down can turn carrier off after the link has recovered. If BMSR reports down but PLA_PHYSTATUS reports up, reschedule the link work to read the current state without waiting for another notification. Tested on an RTL8153B: NetworkManager reported 1000 Mb/s after 3 of 3 rebinds, instead of an unknown speed. Fixes: f6f2e946aa4d ("net: mii: Fix the Speed display when the network cable is not connected") Cc: stable@vger.kernel.org Suggested-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Hayes Wang <hayeswang@realtek.com> Link: https://patch.msgid.link/20261026012345.1902285-1-lilinmao@kylinos.cn Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions