lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a14f1b4-44c1-47d5-b641-7c8a682e4d67@lunn.ch>
Date: Sun, 15 Sep 2024 22:32:39 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Hans-Frieder Vogt <hfdevel@....net>
Cc: netdev@...r.kernel.org, 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: Re: [PATCH net-next v2 2/7] net: phy: aquantia: search for
 firmware-name in fwnode

On Sun, Sep 15, 2024 at 09:55:04PM +0200, Hans-Frieder Vogt wrote:
> 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);

I could be getting this wrong, but my understanding is that
device_property_read_string() will look at dev and see if there is an
OF node available. If so, it will get the property from OF. If there
is not, it looks to see if there is a swnode, and if there is, it uses
that. And if there is an ACPI node, it tries there. So i _think_ you
can replace the of_property_read_string() with
device_property_read_string().

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ