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 Signed-off-by: Sagar Cheluvegowda Signed-off-by: Hongmei Xu --- 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