diff mbox series

[net-next,2/5] net: phy: aquantia: allow firmware loading after aqr_wait_reset_complete

Message ID trinity-ddc3de71-4149-43ad-8e8c-99edf092a769-1726082664469@3c-app-gmx-bs04 (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: tn40xx: add support for AQR105 based cards (was: net: phy: aquantia: emable firmware loading for aqr105) | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 2 maintainers not CCed: robimarko@gmail.com ansuelsmth@gmail.com
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-12--00-00 (tests: 764)

Commit Message

Hans-Frieder Vogt Sept. 11, 2024, 7:24 p.m. UTC
Allow firmware loading from nvmem or fs. As discussed in
https://lore.kernel.org/netdev/20240806112747.soclko5vex2f2c64@skbuf/ the
return value -ETIMEDOUT (returned by aqr_wait_reset_complete when the
firmware version is still 0 after 2s) needs to be let through. Otherwise,
this will prevent loading of an external firmware.

Signed-off-by: Hans-Frieder Vogt <hfdevel@gmx.net>
---
 drivers/net/phy/aquantia/aquantia_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.45.2
diff mbox series

Patch

diff --git a/drivers/net/phy/aquantia/aquantia_firmware.c b/drivers/net/phy/aquantia/aquantia_firmware.c
index 524627a36c6f..090fcc9a3413 100644
--- a/drivers/net/phy/aquantia/aquantia_firmware.c
+++ b/drivers/net/phy/aquantia/aquantia_firmware.c
@@ -354,7 +354,7 @@  int aqr_firmware_load(struct phy_device *phydev)
 	int ret;

 	ret = aqr_wait_reset_complete(phydev);
-	if (ret)
+	if (ret != -ETIMEDOUT)
 		return ret;

 	/* Check if the firmware is not already loaded by pooling