From: Yongzhao Chen <yongzhao.derek@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Vladimir Oltean <olteanv@gmail.com>,
Christian Marangi <ansuelsmth@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Ziyang Huang <hzyitc@outlook.com>
Subject: Re: [RFC PATCH net-next v3 4/5] net: dsa: qca8k: flag QCA8337 internal CPU PHYs for SmartSpeed
Date: Fri, 25 Sep 2026 01:48:14 +0200 [thread overview]
Message-ID: <20260924234814.1734-1-yongzhao.derek@gmail.com> (raw)
In-Reply-To: <09d669ff-7aad-4414-880a-21c2e7bf2cd7@lunn.ch>
Hi Andrew,
The register 0x14 configuration is in patch 5. For a QCA8337 CPU PHY
marked by patch 4, qca8337_soft_reset() clears SmartSpeed enable and
bypass before the software reset. I should have made that relationship
explicit in patch 4.
I have a local read_status change for QCA8337, which I plan to include
in the next RFC. When autonegotiation is enabled, it reads the resolved
speed and duplex from register 0x11, retaining generic link-partner and
master/slave handling. It holds the link down until those values are
valid; forced mode keeps the generic BMCR handling. Local tests that run
the callback and the PHY state machine against a simulated MDIO bus
pass, including a case where 0x11 reports 100 Mb/s while the generic
path resolves 1 Gb/s. W=1 object builds for x86 and arm64 are clean.
I also tested it on RA74 in an OpenWrt backport on Linux 6.18.52, not
the net-next series itself, with the existing CPU SmartSpeed workaround.
On normal 100 and 1000 Mb/s LAN links the reported speed matched 0x11,
including after renegotiating the 100 Mb/s port and after a warm
reboot. These were normal links; I could not force a downshift, so the
downshifted case is only covered by the simulated test.
The existing at803x downshift tunable cannot be reused directly here.
Its setter calls phy_init_hw() after writing 0x14, which would run
qca8337_soft_reset() and clear a requested enable on the flagged CPU
PHY. This shared-port PHY also has no net_device->phydev through which
ethtool can reach it; ethtool on the conduit or wan addresses a
different PHY. I have left tunable support out of this follow-up.
I don't know whether downshift is broken in general or only in
switch-integrated PHYs. My only data point is the RA74 CPU link
failure, and I have no downshift results from user ports or discrete
at803x PHYs. phydev->is_internal is set for every PHY that qca83xx
matches, since they are all switch-internal, including user ports and
QCA8327, so it cannot select just the CPU link. I have not found a
verified erratum for this switch revision.
Thanks,
Yongzhao Chen
next prev parent reply other threads:[~2026-09-24 23:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 21:58 [RFC PATCH net-next v3 0/5] net: dsa: qca8k: add a QCA8337 CPU PHY consumer Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 1/5] net: dsa: pass PHY flags when connecting shared ports Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 2/5] net: dsa: qca8k: serialize CPU MAC pause during MTU changes Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 3/5] net: dsa: qca8k: support QCA8337 internal PHY CPU links Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 4/5] net: dsa: qca8k: flag QCA8337 internal CPU PHYs for SmartSpeed Yongzhao Chen
2026-09-24 2:51 ` Andrew Lunn
2026-09-24 23:48 ` Yongzhao Chen [this message]
2026-09-25 15:17 ` Andrew Lunn
2026-09-23 21:58 ` [RFC PATCH net-next v3 5/5] net: phy: qca83xx: disable SmartSpeed before resetting CPU PHYs Yongzhao Chen
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=20260924234814.1734-1-yongzhao.derek@gmail.com \
--to=yongzhao.derek@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=hzyitc@outlook.com \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®