[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <655a4c2a.5d0a0220.ead80.bb5d@mx.google.com>
Date: Sun, 19 Nov 2023 18:55:47 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [net PATCH] net: phy: correctly check soft_reset ret ONLY if
defined for PHY
On Sun, Nov 19, 2023 at 05:24:00PM +0100, Andrew Lunn wrote:
> On Sun, Nov 19, 2023 at 04:12:58PM +0100, Christian Marangi wrote:
> > soft_reset call for phy_init_hw had multiple revision across the years
> > and the implementation goes back to 2014. Originally was a simple call
> > to write the generic PHY reset BIT, it was then moved to a dedicated
> > function. It was then added the option for PHY driver to define their
> > own special way to reset the PHY. Till this change, checking for ret was
> > correct as it was always filled by either the generic reset or the
> > custom implementation. This changed tho with commit 6e2d85ec0559 ("net:
> > phy: Stop with excessive soft reset"), as the generic reset call to PHY
> > was dropped but the ret check was never made entirely optional and
> > dependent whether soft_reset was defined for the PHY driver or not.
> >
> > Luckly nothing was ever added before the soft_reset call so the ret
> > check (in the case where a PHY didn't had soft_reset defined) although
> > wrong, never caused problems as ret was init 0 at the start of
> > phy_init_hw.
> >
> > To prevent any kind of problem and to make the function cleaner and more
> > robust, correctly move the ret check if the soft_reset section making it
> > optional and needed only with the function defined.
>
> I think this should target net-next, not net. It does not appear to be
> an problem which actually affects somebody using stable kernels.
>
> The change itself looks O.K.
>
Ok to resubmit or should I wait 24h? (asking as it's a very simple
change)
Also is the stable Cc ok?
(that was the main reason I added the net tag to this)
--
Ansuel
Powered by blists - more mailing lists