[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220519153812.egofm2c2r55bvs7c@skbuf>
Date: Thu, 19 May 2022 15:38:13 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Andrew Lunn <andrew@...n.ch>
CC: "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>,
Russell King <rmk+kernel@...linux.org.uk>,
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 05:32:35PM +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.
>
> > What motivates me to make these changes in the first place is the idea
> > that current kernels should work with updated device trees.
>
> By current, you mean old kernels, LTS etc. You want an LTS kernel to
> work with a new DT blob? You want forward compatibility with a DT
> blob. Do the stable rules say anything about that?
>
> Andrew
Hmm, not sure about stable rules, but at least Marc Zyngier has
suggested in the past that this is something which should work:
https://lore.kernel.org/linux-arm-kernel/87czlzjxmz.wl-maz@kernel.org/
To quote:
| > As for compatibility between old kernel and new DT: I guess you'll hear
| > various opinions on this one.
| > https://www.spinics.net/lists/linux-mips/msg07778.html
| >
| > | > Are we okay with the new device tree blobs breaking the old kernel?
| > |
| > | From my point of view, newer device trees are not required to work on
| > | older kernel, this would impose an unreasonable limitation and the use
| > | case is very limited.
|
| My views are on the opposite side. DT is an ABI, full stop. If you
| change something, you *must* guarantee forward *and* backward
| compatibility. That's because:
|
| - you don't control how updatable the firmware is
|
| - people may need to revert to other versions of the kernel because
| the new one is broken
|
| - there are plenty of DT users beyond Linux, and we are not creating
| bindings for Linux only.
|
| You may disagree with this, but for the subsystems I maintain, this is
| the rule I intent to stick to.
Powered by blists - more mailing lists