netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Wei Fang <wei.fang@nxp.com>
Cc: Pierluigi Passaro <pierluigi.p@variscite.com>,
	Pierluigi Passaro <pierluigi.passaro@gmail.com>,
	Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"eran.m@variscite.com" <eran.m@variscite.com>,
	Nate Drude <Nate.D@variscite.com>,
	Francesco Ferraro <francesco.f@variscite.com>
Subject: Re: [PATCH v2] net: fec: manage corner deferred probe condition
Date: Tue, 17 Jan 2023 15:17:54 +0100	[thread overview]
Message-ID: <Y8auEsy7j2LBFmzE@lunn.ch> (raw)
In-Reply-To: <DB9PR04MB810698A50D6B7FD205E69B1B88C69@DB9PR04MB8106.eurprd04.prod.outlook.com>

On Tue, Jan 17, 2023 at 05:54:21AM +0000, Wei Fang wrote:
> > -----Original Message-----
> > From: Pierluigi Passaro <pierluigi.p@variscite.com>
> > Sent: 2023年1月17日 4:23
> > To: Andrew Lunn <andrew@lunn.ch>
> > Cc: Pierluigi Passaro <pierluigi.passaro@gmail.com>; Wei Fang
> > <wei.fang@nxp.com>; Shenwei Wang <shenwei.wang@nxp.com>; Clark Wang
> > <xiaoning.wang@nxp.com>; dl-linux-imx <linux-imx@nxp.com>;
> > davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> > pabeni@redhat.com; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> > eran.m@variscite.com; Nate Drude <Nate.D@variscite.com>; Francesco
> > Ferraro <francesco.f@variscite.com>
> > Subject: Re: [PATCH v2] net: fec: manage corner deferred probe condition
> > 
> > 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
> > >
> 
> 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

  reply	other threads:[~2023-01-17 14:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 21:38 [PATCH v2] net: fec: manage corner deferred probe condition Pierluigi Passaro
2023-01-15 21:56 ` Andrew Lunn
2023-01-15 22:23   ` Pierluigi Passaro
2023-01-16  0:01     ` Andrew Lunn
2023-01-16  8:51       ` Pierluigi Passaro
2023-01-16 15:32         ` Andrew Lunn
2023-01-16 20:23           ` Pierluigi Passaro
2023-01-17  5:54             ` Wei Fang
2023-01-17 14:17               ` Andrew Lunn [this message]
2023-01-16  7:35     ` Alexander Stein
2023-01-16 19:19       ` Pierluigi Passaro
2023-01-17 12:55 ` Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8auEsy7j2LBFmzE@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Nate.D@variscite.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eran.m@variscite.com \
    --cc=francesco.f@variscite.com \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pierluigi.p@variscite.com \
    --cc=pierluigi.passaro@gmail.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).