Re: [PATCH net-next v2 1/1] net: mdio: reset PHY before attempting to access ID register
From: Paolo Abeni
Date: Tue Dec 02 2025 - 07:38:52 EST
On 11/28/25 2:53 PM, Buday Csaba wrote:
> When the ID of an Ethernet PHY is not provided by the 'compatible'
> string in the device tree, its actual ID is read via the MDIO bus.
> For some PHYs this could be unsafe, since a hard reset may be
> necessary to safely access the MDIO registers.
>
> Add a fallback mechanism for such devices: when reading the ID
> fails, the reset will be asserted, and the ID read is retried.
>
> This allows such devices to be used with an autodetected ID.
>
> The fallback mechanism is activated in the error handling path, and
> the return code of fwnode_mdiobus_register_phy() is unaltered, except
> when the reset fails with -EPROBE_DEFER, which is propagated to the
> caller.
>
> Signed-off-by: Buday Csaba <buday.csaba@xxxxxxxxx>
IMHO this deserves an explicit ack from phy maintainers. Unless such ack
is going to land on the ML very soon, I suggest to defer this patch to
the next cycle, as Jakub is wrapping the net-next PR.
Thanks,
Paolo