[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-ad10e630-a77b-4887-b006-2f8885745738-1726430104089@3c-app-gmx-bap07>
Date: Sun, 15 Sep 2024 21:55:04 +0200
From: Hans-Frieder Vogt <hfdevel@....net>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, FUJITA Tomonori
<fujita.tomonori@...il.com>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>
Subject: [PATCH net-next v2 2/7] net: phy: aquantia: search for
firmware-name in fwnode
Allow the firmware name of an Aquantia PHY alternatively be provided by the property
"firmware-name" of a swnode. This software node may be provided by the MAC or MDIO driver.
Signed-off-by: Hans-Frieder Vogt <hfdevel@....net>
---
drivers/net/phy/aquantia/aquantia_firmware.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/phy/aquantia/aquantia_firmware.c b/drivers/net/phy/aquantia/aquantia_firmware.c
index 524627a36c6f..f0e0f04aa2f0 100644
--- a/drivers/net/phy/aquantia/aquantia_firmware.c
+++ b/drivers/net/phy/aquantia/aquantia_firmware.c
@@ -330,8 +330,14 @@ static int aqr_firmware_load_fs(struct phy_device *phydev)
ret = of_property_read_string(dev->of_node, "firmware-name",
&fw_name);
+ /* try next, whether firmware-name has been provided in a swnode */
if (ret)
+ ret = device_property_read_string(dev, "firmware-name",
+ &fw_name);
+ if (ret) {
+ phydev_err(phydev, "failed to read firmware name: %d\n", ret);
return ret;
+ }
ret = request_firmware(&fw, fw_name, dev);
if (ret) {
--
2.45.2
Powered by blists - more mailing lists