* [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
@ 2026-10-29 9:28 Hongmei Xu
2026-10-29 9:30 ` netdev-bot+sinfo
2026-10-29 13:35 ` Andrew Lunn
0 siblings, 2 replies; 7+ messages in thread
From: Hongmei Xu @ 2026-10-29 9:28 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Sagar Cheluvegowda, Hongmei Xu
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
@ 2026-10-29 9:30 ` netdev-bot+sinfo
2026-11-10 4:12 ` Hongmei Xu
0 siblings, 1 reply; 7+ messages in thread
From: netdev-bot+sinfo @ 2026-10-29 9:30 UTC (permalink / raw)
To: Hongmei Xu
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Sagar Cheluvegowda
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
2026-10-29 9:28 [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID Hongmei Xu
2026-10-29 9:30 ` netdev-bot+sinfo
@ 2026-10-29 13:35 ` Andrew Lunn
2026-11-10 4:07 ` Hongmei Xu
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2026-10-29 13:35 UTC (permalink / raw)
To: Hongmei Xu
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Sagar Cheluvegowda
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
2026-10-29 13:35 ` Andrew Lunn
@ 2026-11-10 4:07 ` Hongmei Xu
2026-11-10 14:41 ` Andrew Lunn
0 siblings, 1 reply; 7+ messages in thread
From: Hongmei Xu @ 2026-11-10 4:07 UTC (permalink / raw)
To: Andrew Lunn
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Sagar Cheluvegowda
On Thu, Oct 29, 2026 at 9:35 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> 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?
This is real issue we observed when working on AQR113 bring up.
Below is the basis why this change is needed.
In a word, it is required accorfing to the AQR113 vendor phy databook.
The reset sequence is describled in the databook:
1.When all of the conditions for release from Reset are true, a 20 ms
timer engages, the purpose
of which is to allow the supplies to settle prior to allowing the PHY to boot.
2.After the 20 ms timer has completed, hardware state machines
designed to guarantee PLL and
band-gap stability engage.
3. After the PLLs and band-gap are locked and functioning properly,
the processor and digital
circuitry are released from reset.
4. The PHY image is then loaded through MDIO boot-load and the processor boots.
5. After the processor boots, any provisioned register values are set,
and the PHY enters the
provisioned operating state.
And the definition for Provisiong id in the phy databook is:
Customers may receive multiple ROM images that differ only in their
provisioning.
This field is used to differentiate those images. This field is used
in conjunction
with the firmware major and minor revision numbers to uniquely
identify ROM images.
Since we flash our own FW images on the AQR113 . Prov id cannot be 0x0 .
What we observed is if we didn't wait for Prov id, the id would coming as 0x0.
That was causing link issues. After this change is applied, link never
fails then.
>
> Maybe extend the commit message saying what features will be missing
> if there is no ID.
>
Sure, will add more detail information in the commit message.
> 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?
Regards,
Hongmei Xu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
2026-10-29 9:30 ` netdev-bot+sinfo
@ 2026-11-10 4:12 ` Hongmei Xu
0 siblings, 0 replies; 7+ messages in thread
From: Hongmei Xu @ 2026-11-10 4:12 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Sagar Cheluvegowda
On Thu, Oct 29, 2026 at 5:30 PM <netdev-bot+sinfo@kernel.org> wrote:
>
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - How the issue was discovered, e.g. hit in production, hit during
> development, syzbot report, manual code inspection, LLM or static
> analysis tool scan.
>
Yes, agree, will share the details in new version.
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
>
Yes, agree, will share the details in new version.
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account. If the series needs another revision for
> other reasons, please include the information in the commit messages
> then.
>
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
pw-bot: cr
Regards,
Hongmei Xu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
2026-11-10 4:07 ` Hongmei Xu
@ 2026-11-10 14:41 ` Andrew Lunn
2026-11-11 7:57 ` Hongmei Xu
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2026-11-10 14:41 UTC (permalink / raw)
To: Hongmei Xu
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Sagar Cheluvegowda
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID
2026-11-10 14:41 ` Andrew Lunn
@ 2026-11-11 7:57 ` Hongmei Xu
0 siblings, 0 replies; 7+ messages in thread
From: Hongmei Xu @ 2026-11-11 7:57 UTC (permalink / raw)
To: Andrew Lunn
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Sagar Cheluvegowda
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-11 7:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29 9:28 [PATCH net-next] net: phy: aquantia: Poll global status register for provision ID Hongmei Xu
2026-10-29 9:30 ` netdev-bot+sinfo
2026-11-10 4:12 ` Hongmei Xu
2026-10-29 13:35 ` Andrew Lunn
2026-11-10 4:07 ` Hongmei Xu
2026-11-10 14:41 ` Andrew Lunn
2026-11-11 7:57 ` Hongmei Xu
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®