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] [day] [month] [year] [list]
Message-ID: <33bcede0-8c47-47e0-ae0a-400fb0126628@gmx.net>
Date: Sun, 15 Sep 2024 22:46:54 +0200
From: Hans-Frieder Vogt <hfdevel@....net>
To: Andrew Lunn <andrew@...n.ch>
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 15.09.2024 22.32, Andrew Lunn wrote:
> 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().
When I checked it first, it didn't look like that. However, I think I
found now, where
it diverts into the two directions: of_node or fwnode.
Thanks!

     Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ