mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linmao Li <lilinmao@kylinos.cn>
To: Birger Koblitz <mail@birger-koblitz.de>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Chih Kai Hsu <hsu.chih.kai@realtek.com>,
	nic_swsd@realtek.com, Xiangqian Zhang <zhangxiangqian@kylinos.cn>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net v2] r8152: Use BMSR to detect the link state
Date: Tue, 13 Oct 2026 10:38:22 +0800	[thread overview]
Message-ID: <e7ba57f2-092e-4801-9659-7e7533f031c4@kylinos.cn> (raw)
In-Reply-To: <6030ce9b-1e93-4d11-b9f3-6101fec2229e@birger-koblitz.de>


在 2026/10/13 0:13, Birger Koblitz 写道:
> Hi Linmao,
>
> On 09/10/2026 9:18 am, Linmao Li wrote:
>
>> Hi Birger,
>>
>> Thanks for testing. Only the first BMSR read after link up returns the
>> latched value, so ethtool shows the problem only if nothing else reads
>> the PHY first. On my systems NetworkManager reads it right after
>> carrier up, so a later ethtool reports 1000Mb/s while NetworkManager
>> keeps the unknown speed it read.
>>
>> With an RTL8153B on v7.3-rc6, stopping NetworkManager was enough for
>> ethtool alone to show it after 3 of 3 USB rebinds:
>>
>>    # systemctl stop NetworkManager
>>    # (rebind the device, bring the interface up, wait for carrier)
>>    # ethtool <iface> | grep Speed
>>            Speed: Unknown!
>>    # ethtool <iface> | grep Speed
>>            Speed: 1000Mb/s
>>
>> I got the same result with cable replugs on a 6.6-based kernel. The
>> latch does not time out: the first ethtool still reported Unknown 3 s
>> after carrier up. On the 6.6-based system, the network service of a
>> Chromium-based browser also read the PHY first, so other tools may
>> need to be stopped too. I have not checked your setup and have not
>> tested an RTL8153A.
>
> Thanks for the explanation. I re-did the test and confirm that the fix 
> works. I tested on:
>
> RTL8157 (5GBit device, 2.5GBit link)
> driver: r8152
> version: 7.1.8+deb13-amd64
> firmware-version: rtl8157-1 v1 2026/01/01
>
> RTL8153A (1GBit device, 1GBit link)
> driver: r8152
> version: 7.1.8+deb13-amd64
> firmware-version: rtl8153a-4 v2 02/07/20
>
> both worked flawlessly. I tested
> - plug/unplug during normal operation
> - link-changes by peer in normal operation
> - plug or unplug during suspend, then resume
>
> Tested-by: Birger Koblitz <mail@birger-koblitz.de>
>
> Birger
Hi Birger,

Thanks a lot for testing both devices. Just to be sure, was it the v2
patch as posted, without other changes? The RTL8157 result is
interesting given Hayes's comment about the newer ICs.

The next version will probably change the approach, so I will only
keep your Tested-by if the code stays the same, and would be glad if
you could test it again.

Thanks,
Linmao

  reply	other threads:[~2026-10-13  2:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 10:52 Linmao Li
2026-10-05 18:32 ` Birger Koblitz
2026-10-09  7:18   ` Linmao Li
2026-10-12 16:13     ` Birger Koblitz
2026-10-13  2:38       ` Linmao Li [this message]
2026-10-13  3:51         ` Birger Koblitz
2026-10-06  8:28 ` Hayes Wang
2026-10-06 16:10   ` Andrew Lunn
2026-10-09  7:16     ` Linmao Li
2026-10-09 12:22       ` Andrew Lunn
2026-10-13  2:36         ` Linmao Li
2026-10-13 10:30           ` Hayes Wang
2026-10-13  8:04         ` Hayes Wang
2026-10-14 16:10           ` Andrew Lunn
2026-10-16  7:15             ` Linmao Li
2026-10-19 12:12               ` Hayes Wang
2026-10-20 12:38                 ` Linmao Li
2026-10-13  7:37       ` Hayes Wang
2026-10-06 22:55 ` netdev-bot+sashiko

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=e7ba57f2-092e-4801-9659-7e7533f031c4@kylinos.cn \
    --to=lilinmao@kylinos.cn \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hsu.chih.kai@realtek.com \
    --cc=kuba@kernel.org \
    --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®