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: <0f811481-0976-4aec-a000-417d8b0a2a98@lunn.ch>
Date: Wed, 11 Sep 2024 22:58:02 +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 3/5] net: phy: aquantia: search for
 firmware-name in fwnode

On Wed, Sep 11, 2024 at 09:27:34PM +0200, Hans-Frieder Vogt wrote:
> For loading of a firmware file over the filesystem, and
> if the system is non-device-tree, try finding firmware-name from the software
> node (or: fwnode) of the mdio device. This software node may have been
> provided by the MAC or MDIO driver.
> 
> Signed-off-by: Hans-Frieder Vogt <hfdevel@....net>
> ---
>  drivers/net/phy/aquantia/aquantia_firmware.c | 25 +++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/aquantia/aquantia_firmware.c b/drivers/net/phy/aquantia/aquantia_firmware.c
> index 090fcc9a3413..f6154f815d72 100644
> --- a/drivers/net/phy/aquantia/aquantia_firmware.c
> +++ b/drivers/net/phy/aquantia/aquantia_firmware.c
> @@ -324,14 +324,37 @@ static int aqr_firmware_load_nvmem(struct phy_device *phydev)
>  static int aqr_firmware_load_fs(struct phy_device *phydev)
>  {
>  	struct device *dev = &phydev->mdio.dev;
> +	struct fwnode_handle *fw_node;
>  	const struct firmware *fw;
>  	const char *fw_name;
> +	u32 phy_id;
>  	int ret;
> 
>  	ret = of_property_read_string(dev->of_node, "firmware-name",
>  				      &fw_name);

Did you try just replacing this with:

    	ret = device_property_read_string(dev, "firmware-name", &fw_name);

As far as i understand, the device_property_ functions will look
around in OF, ACPI and swnode to find the given property. As long as
the MAC driver puts the property in the right place, i _think_ this
will just work.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ