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: <20220519152529.s2amgob3enfxc6w6@skbuf>
Date:   Thu, 19 May 2022 15:25:30 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
CC:     Andrew Lunn <andrew@...n.ch>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Saravana Kannan <saravanak@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Robin Murphy <robin.murphy@....com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        John Stultz <jstultz@...gle.com>,
        Alvin Šipraga <alsi@...g-olufsen.dk>,
        Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [RFC PATCH net 0/2] Make phylink and DSA wait for PHY driver that
 defers probe

On Thu, May 19, 2022 at 04:15:32PM +0100, Russell King (Oracle) wrote:
> On Thu, May 19, 2022 at 02:59:36PM +0000, Vladimir Oltean wrote:
> > Hi Andrew,
> > 
> > On Sat, May 14, 2022 at 02:23:51AM +0200, Andrew Lunn wrote:
> > > There is a very different approach, which might be simpler.
> > > 
> > > We know polling will always work. And it should be possible to
> > > transition between polling and interrupt at any point, so long as the
> > > phylock is held. So if you get -EPROBE_DEFFER during probe, mark some
> > > state in phydev that there should be an irq, but it is not around yet.
> > > When the phy is started, and phylib starts polling, look for the state
> > > and try getting the IRQ again. If successful, swap to interrupts, if
> > > not, keep polling. Maybe after 60 seconds of polling and trying, give
> > > up trying to find the irq and stick with polling.
> > 
> > That doesn't sound like something that I'd backport to stable kernels.
> > Letting the PHY driver dynamically switch from poll to IRQ mode risks
> > racing with phylink's workqueue, and generally speaking, phylink doesn't
> > seem to be built around the idea that "bool poll" can change after
> > phylink_start().
> 
> I think you're confused. Andrew is merely talking about phylib's
> polling, not phylink's.
> 
> Phylink's polling is only ever used in two circumstances:
> 
> 1. In fixed-link mode where we have an interruptless GPIO.
> 2. In in-band mode when the PCS specifies it needs to be polled.
> 
> This is not used to poll ethernet PHYs - ethernet PHY polling is
> handled entirely by phylib itself.

You're right, I would have probably figured that out if I actually tried
to implement what Andrew is proposing and not just superficially looking
at the code. I guess I'll try that now and see where that leads me to.
The only thing that remains in that case is fw_devlink blocking PHY
probing for lack of a supplier.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ