From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
To: Thomas Karpiniec <tom.karpiniec@outlook.com>
Cc: Coia Prant <coiaprant@gmail.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Choong Yong Liang <yong.liang.choong@linux.intel.com>,
Bartosz Golaszewski <brgl@kernel.org>,
Russell King <rmk+kernel@armlinux.org.uk>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: stmmac: qcom-ethqos: advertise supported SerDes interfaces
Date: Fri, 18 Sep 2026 10:48:09 +0530 [thread overview]
Message-ID: <aqzJkYqRgpBTOB9N@oss.qualcomm.com> (raw)
In-Reply-To: <SJ2PR11MB840156009D655CB83CD04EF8E4872@SJ2PR11MB8401.namprd11.prod.outlook.com>
On Fri, Sep 18, 2026 at 02:36:04PM +1000, Thomas Karpiniec wrote:
> On 17/09/2026 6:21 pm, Coia Prant wrote:
> > Maxime Chevallier <maxime.chevallier@bootlin.com> 于2026年9月17日周四 13:36写道:
> > > On 9/17/26 06:29, Thomas Karpiniec wrote:
> > > > I tested setting STMMAC_FLAG_SERDES_SUPPORTS_2500M on hardware and unfortunately the flag alone doesn't solve the problem.
> > >
> > > Yeah, but it's still the right first move. Russell planned to do that as well
>
> > > > I think there are a couple of things missing. stmmac_phylink_setup doesn't use the integrated PCS bitmap to populate config->supported_interfaces, so SGMII is still not advertised to phylink as a usable host interface. Also stmmac_integrated_pcs_init is adding 1000BASE-X unconditionally, which wouldn't be appropriate here.
> > >
> > > Ok so, the missing bit seems to be that priv->integrated_pcs isn't taken
> > > into account in stmmac_phylink_setup(). This needs to be added then :)
> > >
> > > Looks like there's also the inband support that needs addressing
>
> > On the qcom issue: the missing bit seems to be that
> > stmmac_phylink_setup() only looks at priv->hw->xpcs and
> > priv->hw->phylink_pcs, not priv->integrated_pcs. Extending the existing
> > OR to cover the integrated PCS would let qcom-ethqos work without a
> > new get_interfaces() callback.
> Thanks all for the feedback! Including the integrated PCS in
> stmmac_phylink_setup makes sense and I've now confirmed that this works
> end-to-end on my QCA8081 board.
>
> I've prepared a v2 that replaces the get_interfaces change with two commits:
> one to set STMMAC_FLAG_SERDES_SUPPORTS_2500M in qcom-ethqos, and one to
> include the integrated PCS in config->supported_interfaces
>
> I reviewed the work that Russell was doing and I see the problem. Both the
> integrated PCS and the ethqos code are configuring in-band negotiation. On
> SGMII this occurs twice - both turn it on - and on 2500BASE-X the PCS
> briefly turns it on before ethqos turns it off. On my board, it finishes in
> the correct state.
Right, I think that was the primary concern at the time. Ideally, ethqos
shouldn't have to touch any PCS setting.
>
> I have tested cold boot connected at both 1 Gbps and 2.5 Gbps, and
> transitions in both directions. However, this is a slow transition where I
> am physically unplugging the cable.
>
> I attached kprobes to dwmac_integrated_pcs_config and
> ethqos_fix_mac_speed_sgmii, which are the generic and Qualcomm functions
> leading to ANE configuration. We see this on 1 -> 2.5 Gbps:
>
> 464.233469 integrated_pcs_config interface=2500BASE-X neg_mode=OUTBAND
> 464.234778 fix_speed interface=2500BASE-X speed=2500
>
> 2.5 Gbps -> 1 Gbps:
>
> 279.018122 integrated_pcs_config interface=SGMII neg_mode=OUTBAND
> 279.019708 fix_speed interface=SGMII speed=1000
>
> During the cable swaps, Linux briefly reasserted carrier at the previous
> speed before the link went down again and came up at the new speed. The log
> contained several PCS Link Down/Up and ANE-complete interrupts. I'm not
> seeing any evidence of churn or link instability once connected.
>
> Russell's wider change is compelling but affects a much wider range of
> hardware. I believe this targeted fix can work separately.
>
> I'll post the updated version shortly. Thanks for your time.
>
Sure, I will share some test results of my own (with v2) in a couple of
days.
Ayaan
next prev parent reply other threads:[~2026-09-18 5:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 10:39 [PATCH net 0/2] stmmac: fix ETHQOS SerDes interface handling Thomas Karpiniec
2026-09-16 10:39 ` [PATCH net 1/2] net: stmmac: propagate platform mac_finish errors Thomas Karpiniec
2026-09-16 12:03 ` Mohd Ayaan Anwar
2026-09-17 4:01 ` Thomas Karpiniec
2026-09-16 13:02 ` Maxime Chevallier
2026-09-16 10:39 ` [PATCH net 2/2] net: stmmac: qcom-ethqos: advertise supported SerDes interfaces Thomas Karpiniec
2026-09-16 12:17 ` Mohd Ayaan Anwar
2026-09-16 12:58 ` Maxime Chevallier
2026-09-17 4:29 ` Thomas Karpiniec
2026-09-17 5:36 ` Maxime Chevallier
2026-09-17 8:21 ` Coia Prant
2026-09-18 4:36 ` Thomas Karpiniec
2026-09-18 5:18 ` Mohd Ayaan Anwar [this message]
2026-09-17 15:59 ` Mohd Ayaan Anwar
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=aqzJkYqRgpBTOB9N@oss.qualcomm.com \
--to=mohd.anwar@oss.qualcomm.com \
--cc=andrew+netdev@lunn.ch \
--cc=brgl@kernel.org \
--cc=coiaprant@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=tom.karpiniec@outlook.com \
--cc=yong.liang.choong@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.