lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB9PR04MB81063375BAC5F0B9CBBB6A0D88D99@DB9PR04MB8106.eurprd04.prod.outlook.com>
Date:   Thu, 9 Feb 2023 09:17:25 +0000
From:   Wei Fang <wei.fang@....com>
To:     "Sverdlin, Alexander" <alexander.sverdlin@...mens.com>,
        "andrew@...n.ch" <andrew@...n.ch>
CC:     Clark Wang <xiaoning.wang@....com>,
        Shenwei Wang <shenwei.wang@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: fec: Defer probe if other FEC has deferred MDIO

> -----Original Message-----
> From: Sverdlin, Alexander <alexander.sverdlin@...mens.com>
> Sent: 2023年2月9日 15:28
> To: andrew@...n.ch
> Cc: Wei Fang <wei.fang@....com>; Clark Wang <xiaoning.wang@....com>;
> Shenwei Wang <shenwei.wang@....com>; netdev@...r.kernel.org;
> dl-linux-imx <linux-imx@....com>; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] net: fec: Defer probe if other FEC has deferred MDIO
> 
> Hello Andrew,
> 
> On Thu, 2023-02-09 at 01:55 +0100, Andrew Lunn wrote:
> > > -       if ((fep->quirks & FEC_QUIRK_SINGLE_MDIO) && fep->dev_id >
> > > 0) {
> > > +       if (fep->quirks & FEC_QUIRK_SINGLE_MDIO) {
> > >                 /* fec1 uses fec0 mii_bus */
> > >                 if (mii_cnt && fec0_mii_bus) {
> > >                         fep->mii_bus = fec0_mii_bus;
> > >                         mii_cnt++;
> > >                         return 0;
> > >                 }
> > > -               return -ENOENT;
> >
> > Could you not add an else clause here? return -EPROBE_DEFFER?
> >
> > Basically, if fec0 has not probed, deffer the probing of fec1?
> 
> we do have a configuration with i.MX8 where we have only fec2 enabled (and
> has mdio node).
> I'm not sure if it was thought of by fec driver developers (it makes a lot of
> non-obvious assumtions), but that's how it works now.
> 

Hi Alexander,

This issue seems that the fec2 (without mdio subnode) registers mii_bus first, then
the fec1 (has mdio subnode) use the fec2's mii_bus when fec1 probes again, finally
both fec1 and fec2 can not connect to PHY. Am I right?

If so, I think this issue can't be reproduced on the upstream tree, because the quirks of
i.MX8 on the upstream tree do not set the FEC_QUIRK_SINGLE_MDIO bit. So, the fec1
will registers a mii_bus in your case rather than using the fec2's mii_bus. I'm a bit curious
that have you tried to reproduce this issue base on the upstream tree?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ