From: Yongzhao Chen <yongzhao.derek@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Vladimir Oltean <olteanv@gmail.com>,
Christian Marangi <ansuelsmth@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Jonas Gorski <jonas.gorski@gmail.com>,
Woojung Huh <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com, Ziyang Huang <hzyitc@outlook.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Jie Luo <jie.luo@oss.qualcomm.com>
Subject: Re: [RFC PATCH net-next v2 5/5] net: phy: qca83xx: disable SmartSpeed before resetting CPU PHYs
Date: Fri, 25 Sep 2026 01:48:41 +0200 [thread overview]
Message-ID: <20260924234842.1405-1-yongzhao.derek@gmail.com> (raw)
In-Reply-To: <c09a810b-79a9-4a4a-b484-c26e1b4acb52@lunn.ch>
Hi Andrew,
I agree that if downshift is broken more generally, disabling it in the
PHY driver, possibly with a default-off tunable, would avoid the need
for this flag. I have not established that. I ran into this on my own
home router and don't have a way to force a downshift, such as a
two-pair cable, so I have not tested user ports. If anyone with
QCA8337 hardware can try a user port with a two-pair cable, that would
answer the general question. Disabling it in qca83xx without a flag
would also remove downshift from user ports, where I have no evidence
that it misbehaves.
On how it differs from other PHYs: in the failing state there was no
link at any layer. BMSR read 0x7949 with link and AN-complete clear,
0x11 was 0x1030 with resolved and link clear, and the conduit had no
carrier. So I have not observed a downshifted link, only the 1000BASE-T
advertisement in CTRL1000 being cleared by a path I have not
identified. The 0x11 value does have bit 5 set, which the QCA8337N
datasheet I have describes as downgrade, but bit 4, documented as
reserved/always 0, is also set, so I am not relying on that decoding.
For the next RFC I would keep the flag, limited to QCA8337 internal CPU
ports. qca8k knows the switch model and port role, qca83xx owns the
registers and reset/resume, and get_phy_flags() delivers the
requirement before the first reset without the PHY driver inspecting
DSA topology. phydev->is_internal also covers user ports. The
workaround has only been tested on CPU PHY4 on RA74, and that result
does not by itself show that a flag is the right selection mechanism.
I have not found a verified erratum for this revision, and as a home
user I do not have a Qualcomm support channel, so I have added Jie Luo,
who has worked on the Qualcomm PHY drivers, to Cc.
Jie, could you forward this to someone at Qualcomm who can check
whether there is a SmartSpeed erratum for the QCA8337 internal PHYs?
If you have seen SmartSpeed problems on an internal PHY used as a CPU
link, or have a recommended way to handle it, that would also help.
Christian, as the qca8k maintainer, have you seen SmartSpeed cause
link problems on QCA8337 PHYs, either on CPU links or on user ports?
That would help answer whether this is specific to the CPU link.
Would you consider this CPU-link scope and get_phy_flags() approach
reasonable for the next RFC, or suggest a different way to select the
workaround?
Thanks,
Yongzhao Chen
prev parent reply other threads:[~2026-09-24 23:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 20:26 [RFC PATCH net-next v2 0/5] net: dsa: qca8k: add a QCA8337 CPU PHY consumer Yongzhao Chen
2026-09-22 20:26 ` [RFC PATCH net-next v2 1/5] net: dsa: pass PHY flags when connecting shared ports Yongzhao Chen
2026-09-22 21:49 ` Florian Fainelli
2026-09-22 20:26 ` [RFC PATCH net-next v2 2/5] net: dsa: qca8k: support an internal PHY as the CPU port Yongzhao Chen
2026-09-22 20:26 ` [RFC PATCH net-next v2 3/5] net: dsa: qca8k: serialize CPU MAC pause during MTU changes Yongzhao Chen
2026-09-22 20:58 ` Andrew Lunn
2026-09-23 21:57 ` Yongzhao Chen
2026-09-22 20:26 ` [RFC PATCH net-next v2 4/5] net: dsa: qca8k: flag QCA8337 internal CPU PHYs for SmartSpeed Yongzhao Chen
2026-09-22 21:00 ` Andrew Lunn
2026-09-23 21:57 ` Yongzhao Chen
2026-09-22 20:26 ` [RFC PATCH net-next v2 5/5] net: phy: qca83xx: disable SmartSpeed before resetting CPU PHYs Yongzhao Chen
2026-09-22 21:06 ` Andrew Lunn
2026-09-23 21:57 ` Yongzhao Chen
2026-09-24 12:30 ` Andrew Lunn
2026-09-24 23:48 ` Yongzhao Chen [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=20260924234842.1405-1-yongzhao.derek@gmail.com \
--to=yongzhao.derek@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=hzyitc@outlook.com \
--cc=jie.luo@oss.qualcomm.com \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=woojung.huh@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox