[PATCH net] net: phy: aquantia: check for NVMEM deferral

Robert Marko posted 1 patch 4 days, 9 hours ago
drivers/net/phy/aquantia/aquantia_firmware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH net] net: phy: aquantia: check for NVMEM deferral
Posted by Robert Marko 4 days, 9 hours ago
Currently, if NVMEM provider is probed later than Aquantia, loading the
firmware will fail with -EINVAL.

To fix this, simply check for -EPROBE_DEFER when NVMEM is attempted and
return it.

Fixes: e93984ebc1c8 ("net: phy: aquantia: add firmware load support")
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 drivers/net/phy/aquantia/aquantia_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/aquantia/aquantia_firmware.c b/drivers/net/phy/aquantia/aquantia_firmware.c
index bbbcc9736b00..569256152689 100644
--- a/drivers/net/phy/aquantia/aquantia_firmware.c
+++ b/drivers/net/phy/aquantia/aquantia_firmware.c
@@ -369,7 +369,7 @@ int aqr_firmware_load(struct phy_device *phydev)
 		 * assume that, and load a new image.
 		 */
 		ret = aqr_firmware_load_nvmem(phydev);
-		if (!ret)
+		if (ret == -EPROBE_DEFER || !ret)
 			return ret;
 
 		ret = aqr_firmware_load_fs(phydev);
-- 
2.52.0
Re: [PATCH net] net: phy: aquantia: check for NVMEM deferral
Posted by Russell King (Oracle) 4 days, 8 hours ago
On Thu, Nov 27, 2025 at 12:44:35PM +0100, Robert Marko wrote:
> Currently, if NVMEM provider is probed later than Aquantia, loading the
> firmware will fail with -EINVAL.
> 
> To fix this, simply check for -EPROBE_DEFER when NVMEM is attempted and
> return it.
> 
> Fixes: e93984ebc1c8 ("net: phy: aquantia: add firmware load support")
> Signed-off-by: Robert Marko <robimarko@gmail.com>

As aqr_firmware_load() is called from the probe function, returning
-EPROBE_DEFER from here is fine.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!