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]
Date: Fri, 1 Dec 2023 14:41:09 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Heiko Stuebner <heiko@...ech.de>, andrew@...n.ch, hkallweit1@...il.com
Cc: linux@...linux.org.uk, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, quentin.schulz@...obroma-systems.com,
 Heiko Stuebner <heiko.stuebner@...rry.de>
Subject: Re: [PATCH] net: mdio: enable optional clock when registering a phy
 from devicetree

On 12/1/23 06:24, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@...rry.de>
> 
> The ethernet-phy binding (now) specifys that phys can declare a clock
> supply. Phy driver itself will handle this when probing the phy-driver.
> 
> But there is a gap when trying to detect phys, because the mdio-bus needs
> to talk to the phy to get its phy-id. Using actual phy-ids in the dt like
>         compatible = "ethernet-phy-id0022.1640",
>                      "ethernet-phy-ieee802.3-c22";
> of course circumvents this, but in turn hard-codes the phy.

But it is the established practice for situations like those where you 
need specific resources to be available in order to identify the device 
you are trying to probe/register.

You can get away here with the clock API because it can operate on 
device_node, and you might be able with a bunch of other "resources" 
subsystems, but for instance with regulators, that won't work, we need a 
"struct device" which won't be created because that is exactly what we 
are trying to do.

Also this only works for OF, not for ACPI or other yet to come firmware 
interface.

Sorry but NACK.

I am sympathetic to the idea that if you have multiple boards and you 
may have multiple PHY vendors this may not really scale, but in 2023 you 
have boot loaders aware of the Device Tree which can do all sorts of 
live DTB patching to provide the kernel with a "perfect" view of the world.
-- 
Florian


Powered by blists - more mailing lists