Thread View: linux.kernel.netdev
4 messages
4 total messages
Started by Hongmei Xu
Thu, 29 Oct 2026 09:28
[PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
Author: Hongmei Xu
Date: Thu, 29 Oct 2026 09:28
Date: Thu, 29 Oct 2026 09:28
54 lines
17257 bytes
17257 bytes
After the firmware reset sequence completes, the global reserved status register (VEND1_GLOBAL_RSVD_STAT1) may not yet contain a valid provision ID. This can cause subsequent firmware operations to proceed with stale state. Poll VEND1_GLOBAL_RSVD_STAT1 until the provision ID field is non-zero before returning from aqr_wait_reset_complete(). A timeout is treated as a non-fatal warning since the PHY can still function without a valid provision ID. Co-developed-by: Sagar Cheluvegowda <sagar.cheluvegowda@oss.qualcomm.com> Signed-off-by: Sagar Cheluvegowda <sagar.cheluvegowda@oss.qualcomm.com> Signed-off-by: Hongmei Xu <hongmei.xu@oss.qualcomm.com> --- drivers/net/phy/aquantia/aquantia_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index e95d391a6dc2..1d8429a9abbc 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -702,7 +702,22 @@ int aqr_wait_reset_complete(struct phy_device *phydev) return val; } - return ret; + if (ret) + return ret; + + ret = read_poll_timeout(phy_read_mmd, val, + val < 0 || + FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_PROV_ID, val), + AQR_FW_WAIT_SLEEP_US, AQR_FW_WAIT_TIMEOUT_US, + false, phydev, MDIO_MMD_VEND1, + VEND1_GLOBAL_RSVD_STAT1); + if (val < 0) + phydev_warn(phydev, "Failed to read VEND1_GLOBAL_RSVD_STAT1: %pe\n", + ERR_PTR(val)); + else if (ret) + phydev_warn(phydev, "Provision ID not ready\n"); + + return 0; } static int aqr_build_fingerprint(struct phy_device *phydev) --- base-commit: 944ae66642b726bd6b25ae71b1e9ff88a0e0bdb0 change-id: 20260923-aquantia-poll-global-status-register-d8966a46e56d Best regards, -- Hongmei Xu <hongmei.xu@oss.qualcomm.com>
Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
Author: Andrew Lunn
Date: Thu, 29 Oct 2026 13:35
Date: Thu, 29 Oct 2026 13:35
22 lines
9134 bytes
9134 bytes
On Thu, Oct 29, 2026 at 05:28:10PM +0800, Hongmei Xu wrote: > After the firmware reset sequence completes, the global reserved status > register (VEND1_GLOBAL_RSVD_STAT1) may not yet contain a valid provision > ID. This can cause subsequent firmware operations to proceed with stale > state. > > Poll VEND1_GLOBAL_RSVD_STAT1 until the provision ID field is non-zero > before returning from aqr_wait_reset_complete(). A timeout is treated as > a non-fatal warning since the PHY can still function without a valid > provision ID. If it can still work without the provisioning ID, why bother reading it? Maybe extend the commit message saying what features will be missing if there is no ID. It looks like USXGMII and 10G-QXGMII might be mixed up? Is such a mix up not fatal? Andrew
Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
Author: Andrew Lunn
Date: Tue, 10 Nov 2026 14:41
Date: Tue, 10 Nov 2026 14:41
13 lines
8831 bytes
8831 bytes
> > It looks like USXGMII and 10G-QXGMII might be mixed up? Is such a mix
> > up not fatal?
> >
> > Andrew
> Is this comment mis-posted? No USXGMII and 10G-QXGMII related inforamtion
> in this patch, isn't it? Please help to confirm if I have any
> misunsterdaning here?
The provisioning ID is used to determine USXGMII vs 10G-QXGMII. If you
don't have the ID, they get mixed up.
Andrew
Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
Author: Hongmei Xu
Date: Wed, 11 Nov 2026 07:57
Date: Wed, 11 Nov 2026 07:57
33 lines
17506 bytes
17506 bytes
On Tue, Nov 10, 2026 at 10:41 PM Andrew Lunn <andrew@lunn.ch> wrote: > > > > It looks like USXGMII and 10G-QXGMII might be mixed up? Is such a mix > > > up not fatal? > > > > > > Andrew > > Is this comment mis-posted? No USXGMII and 10G-QXGMII related inforamtion > > in this patch, isn't it? Please help to confirm if I have any > > misunsterdaning here? > > The provisioning ID is used to determine USXGMII vs 10G-QXGMII. If you > don't have the ID, they get mixed up. Totally got your point now. The chain is: aqr_wait_reset_complete() returns 0 on timeout → aqr_build_fingerprint() still runs but reads a stale/zero prov_id → aqr_translate_interface() fingerprint won't match AQR_G3_V4_3_C_AQR_NXP_SPF_30841_MUSX_ID40019_VER1198 → USXGMII stays as-is instead of being translated to 10G-QXGMII for AQR412C/MUSX. So for AQR412C with MUSX firmware, a timeout is genuinely fatal because the interface mode ends up wrong. Will change the commit message to describe this consequence, and add a phydev_warn on timeout so users have a visible log hint that interface mode detection may be incorrect. I'll still not fail the probe since the existing caller already ignores the timeout — but the warning makes the failure visible. Regards, Hongmei Xu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads