From: Hayes Wang <hayeswang@realtek.com>
To: Linmao Li <lilinmao@kylinos.cn>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@kernel.org" <edumazet@kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>
Cc: nic_swsd <nic_swsd@realtek.com>,
Chih Kai Hsu <hsu.chih.kai@realtek.com>,
"mail@birger-koblitz.de" <mail@birger-koblitz.de>,
"zhangxiangqian@kylinos.cn" <zhangxiangqian@kylinos.cn>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH net v3] r8152: Use BMSR to detect the link state
Date: Tue, 27 Oct 2026 05:49:31 +0000 [thread overview]
Message-ID: <65b2cd5e124a4fee9eb5b013e4069e44@realtek.com> (raw)
In-Reply-To: <20261026012345.1902285-1-lilinmao@kylinos.cn>
Linmao Li <lilinmao@kylinos.cn>
> Sent: Monday, October 26, 2026 9:24 AM
> To: andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@kernel.org;
> kuba@kernel.org; pabeni@redhat.com
> Cc: Hayes Wang <hayeswang@realtek.com>; nic_swsd
> <nic_swsd@realtek.com>; Chih Kai Hsu <hsu.chih.kai@realtek.com>;
> mail@birger-koblitz.de; zhangxiangqian@kylinos.cn; linux-usb@vger.kernel.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; stable@vger.kernel.org;
> Linmao Li <lilinmao@kylinos.cn>
> Subject: [PATCH net v3] r8152: Use BMSR to detect the link state
>
>
> External mail : This email originated from outside the organization. Do not
> reply, click links, or open attachments unless you recognize the sender and
> know the content is safe.
>
>
>
> 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>
Best Regards,
Hayes
prev parent reply other threads:[~2026-10-27 5:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 1:23 Linmao Li
2026-10-27 5:49 ` Hayes Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65b2cd5e124a4fee9eb5b013e4069e44@realtek.com \
--to=hayeswang@realtek.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hsu.chih.kai@realtek.com \
--cc=kuba@kernel.org \
--cc=lilinmao@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@birger-koblitz.de \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=zhangxiangqian@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®