lkml.org 
[lkml]   [2023]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] net: fec: manage corner deferred probe condition
Date
On Mon, Jan 16, 2023 at 4:32 PM Andrew Lunn <andrew@lunn.ch> wrote:
> > This is the setup of the corner case:
> > - FEC0 is the owner of MDIO bus, but its own PHY rely on a "delayed" GPIO
> > - FEC1 rely on FEC0 for MDIO communications
> > The sequence is something like this
> > - FEC0 probe start, but being the reset GPIO "delayed" it return EPROBE_DEFERRED
> > - FEC1 is successfully probed: being the MDIO bus still not owned, the driver assume
> >   that the ownership must be assigned to the 1st one successfully probed, but no
> >   MDIO node is actually present and no communication takes place.
>
> So semantics of a phandle is that you expect what it points to, to
> exists. So if phy-handle points to a PHY, when you follow that pointer
> and find it missing, you should defer the probe. So this step should
> not succeed.
>
I agree with you: the check is present, but the current logic is not consistent.
Whenever the node owning the MDIO fails the probe due to EPROBE_DEFERRED,
also the second node must defer the probe, otherwise no MDIO communication
is possible.
That's why the patch set the static variable wait_for_mdio_bus to track the status.
>
> > - FEC0 is successfully probed, but MDIO bus is now assigned to FEC1
> >   and cannot  and no communication takes place
>
>        Andrew
\
 
 \ /
  Last update: 2023-03-26 23:43    [W:0.135 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site