From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Coia Prant'" <coiaprant@gmail.com>, "'Andrew Lunn'" <andrew@lunn.ch>
Cc: <kuba@kernel.org>, <davem@davemloft.net>, <edumazet@google.com>,
<pabeni@redhat.com>, <andrew+netdev@lunn.ch>, <robh@kernel.org>,
<krzk+dt@kernel.org>, <heiko@sntech.de>, <netdev@vger.kernel.org>,
<linux-rockchip@lists.infradead.org>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-phy@lists.infradead.org>,
"'Mengyuan Lou'" <mengyuanlou@net-swift.com>
Subject: RE: [RFC PATCH 06/10] net: pcs: xpcs: improve SGMII AN state handling for Rockchip RK3568
Date: Fri, 17 Jul 2026 10:22:51 +0800 [thread overview]
Message-ID: <000c01dd1593$2ac0b0f0$804212d0$@trustnetic.com> (raw)
In-Reply-To: <CALj3r0jdkDEjpO+7NOTGs+wgukKvD=fzFn4ewpurxxPswCE5GA@mail.gmail.com>
On Wed, Jul 15, 2026 7:05 AM, Coia Prant wrote:
> Andrew Lunn <andrew@lunn.ch> 于2026年7月15日周三 06:44写道:
> >
> > On Wed, Jul 15, 2026 at 03:08:34AM +0800, Coia Prant wrote:
> > > Commit 2a22b7ae2fa3 ("net: pcs: xpcs: adapt Wangxun NICs for SGMII mode")
> >
> > You do not appear to Cc: the Wangxun NIC people. It would be good to
> > have there comments on this change.
>
> I apologize; the output from get_maintainer.pl is very long. I’ve
> heard that having too many recipients can cause the PATCH to be
> rejected by the LKML mail server.
>
> I have added Wangxun maintainer (Jiawen Wu <jiawenwu@trustnetic.com>
> and Mengyuan Lou <mengyuanlou@net-swift.com>) to the CC list.
>
> > > Fixes: 2a22b7ae2fa3 ("net: pcs: xpcs: adapt Wangxun NICs for SGMII mode")
> > > Signed-off-by: Coia Prant <coiaprant@gmail.com>
> >
> > Please don't mix fixed and new code. Is this a real fix? Should it be
> > back ported to stable?
>
> I am not sure if this is a specific characteristic of Wangxun NICs, as
> I do not have any available for testing.
>
> The behavior of the Rockchip DW XPCS IP core matches what is described
> in the commit message (even though phylink brings the link to down
> based on the phydev link status).
>
> This appears to be a bug (at least on Rockchip platforms) or Wangxun
> NICs features.
>
> However, I cannot confirm whether Wangxun NICs behave the same way.
> Therefore, I have kept their code as is for now.
>
> Could a Wangxun NICs maintainer provide some feedback based on testing?
>
> If we can confirm that this is indeed a bug, I can submit a separate fix.
>
> I would greatly appreciate it.
>
> Thanks.
Hi Coia,
I have tested this patch and it works on Wangxun NICs, thanks.
The commit 2a22b7ae2fa3 ("net: pcs: xpcs: adapt Wangxun NICs for SGMII mode")
is too long ago for me to recall exactly what that thought was.
The log shows:
"On this device, CL37_ANSGM_STS (bit[4:1] of VR_MII_AN_INTR_STS) indicates
the status received from remote link during the auto-negotiation, and
self-clear after the auto-negotiation is complete.
Meanwhile, CL37_ANCMPLT_INTR will be set to 1, to indicate CL37 AN is
complete. So add another way to get the state for CL37 SGMII."
I tried to reproduce this issue, but it didn't seem to exist.
In the current logic:
link up -> read status from CL37_ANSGM_STS -> CL37_ANCMPLT_INTR not clear
link down -> read status from BMCR -> CL37_ANCMPLT_INTR clear
It also works, although CL37_ANCMPLT_INTR is not cleared every time, and AN
restart is absent. But BMCR looks like it only wants to be return as 0, it is
weird.
So I think Wangxun NICs also can be applied to general code as well, for
getting state in C37 SGMII mode.
However, I am wondering whether CL37_ANCMPLT_INTR clear and ANRESTART are
necessary.
next prev parent reply other threads:[~2026-07-17 2:23 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 19:08 [RFC PATCH 00/10] net-next: add basic support for RK3568 XPCS Coia Prant
2026-07-14 19:08 ` [RFC PATCH 01/10] net: stmmac: move XPCS lifetime management to platform drivers Coia Prant
2026-07-15 7:31 ` Maxime Chevallier
2026-07-15 8:17 ` Coia Prant
2026-07-15 8:44 ` Christian Marangi
2026-07-15 11:15 ` Maxime Chevallier
2026-07-15 16:09 ` Andrew Lunn
2026-07-15 21:39 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 02/10] dt-bindings: phy: rockchip: naneng-combphy: add rockchip,sgmii-mac-sel property Coia Prant
2026-07-15 19:14 ` sashiko-bot
2026-07-15 19:53 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 03/10] phy: rockchip: naneng-combphy: add SGMII MAC selection for RK3568 Coia Prant
2026-07-15 19:14 ` sashiko-bot
2026-07-15 19:55 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 04/10] dt-bindings: net: pcs: add rockchip,rk3568-xpcs binding Coia Prant
2026-07-15 19:14 ` sashiko-bot
2026-07-15 20:01 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 05/10] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
2026-07-15 19:14 ` sashiko-bot
2026-07-15 20:09 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 06/10] net: pcs: xpcs: improve SGMII AN state handling for Rockchip RK3568 Coia Prant
2026-07-14 22:44 ` Andrew Lunn
2026-07-14 23:05 ` Coia Prant
2026-07-17 2:22 ` Jiawen Wu [this message]
2026-07-17 6:28 ` Coia Prant
2026-07-17 7:03 ` Jiawen Wu
2026-07-15 19:14 ` sashiko-bot
2026-07-15 20:19 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 07/10] net: pcs: xpcs: add Rockchip RK3568 platform glue driver Coia Prant
2026-07-15 7:42 ` Maxime Chevallier
2026-07-15 7:57 ` Coia Prant
2026-07-15 16:18 ` Andrew Lunn
2026-07-15 21:23 ` Coia Prant
2026-07-15 22:25 ` Andrew Lunn
2026-07-15 23:01 ` Coia Prant
2026-07-15 19:14 ` sashiko-bot
2026-07-15 22:04 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 08/10] net: stmmac: dwmac-rk: add SGMII support for RK3568 Coia Prant
2026-07-15 19:14 ` sashiko-bot
2026-07-15 20:33 ` Coia Prant
2026-07-14 19:08 ` [RFC PATCH 09/10] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
2026-07-14 19:08 ` [RFC PATCH 10/10] MAINTAINERS: add entry for Rockchip XPCS driver Coia Prant
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='000c01dd1593$2ac0b0f0$804212d0$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=coiaprant@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/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