[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y8auEsy7j2LBFmzE@lunn.ch>
Date: Tue, 17 Jan 2023 15:17:54 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Wei Fang <wei.fang@....com>
Cc: Pierluigi Passaro <pierluigi.p@...iscite.com>,
Pierluigi Passaro <pierluigi.passaro@...il.com>,
Shenwei Wang <shenwei.wang@....com>,
Clark Wang <xiaoning.wang@....com>,
dl-linux-imx <linux-imx@....com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"eran.m@...iscite.com" <eran.m@...iscite.com>,
Nate Drude <Nate.D@...iscite.com>,
Francesco Ferraro <francesco.f@...iscite.com>
Subject: Re: [PATCH v2] net: fec: manage corner deferred probe condition
On Tue, Jan 17, 2023 at 05:54:21AM +0000, Wei Fang wrote:
> > -----Original Message-----
> > From: Pierluigi Passaro <pierluigi.p@...iscite.com>
> > Sent: 2023年1月17日 4:23
> > To: Andrew Lunn <andrew@...n.ch>
> > Cc: Pierluigi Passaro <pierluigi.passaro@...il.com>; Wei Fang
> > <wei.fang@....com>; Shenwei Wang <shenwei.wang@....com>; Clark Wang
> > <xiaoning.wang@....com>; dl-linux-imx <linux-imx@....com>;
> > davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> > pabeni@...hat.com; netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> > eran.m@...iscite.com; Nate Drude <Nate.D@...iscite.com>; Francesco
> > Ferraro <francesco.f@...iscite.com>
> > Subject: Re: [PATCH v2] net: fec: manage corner deferred probe condition
> >
> > On Mon, Jan 16, 2023 at 4:32 PM Andrew Lunn <andrew@...n.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
> > >
>
> Have you tested that this issue also exists on the net tree? According to your
> description, I simulated your situation on the net tree and tested it with imx6ul,
> but the problem you mentioned does not exist. Below is is my test patch.
Hi Wei
Reading the emails from Pierluigi, i don't get the feeling he really
understands the problem and has got to the root cause. I've not seen a
really good, detailed explanation of what is going wrong.
Andrew
Powered by blists - more mailing lists