lkml.org 
[lkml]   [2025]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v2 1/1] net: mdio: reset PHY before attempting to access ID register
From
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@prolan.hu>

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


\
 
 \ /
  Last update: 2025-12-02 13:38    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog