Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: aquantia: check for NVMEM deferral

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>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20251127114514.460924-1-robimarko@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Robert Marko and committed by
Jakub Kicinski
a6c121a2 1f73a56f

+1 -1
+1 -1
drivers/net/phy/aquantia/aquantia_firmware.c
··· 369 369 * assume that, and load a new image. 370 370 */ 371 371 ret = aqr_firmware_load_nvmem(phydev); 372 - if (!ret) 372 + if (ret == -EPROBE_DEFER || !ret) 373 373 return ret; 374 374 375 375 ret = aqr_firmware_load_fs(phydev);