[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aRvdaxBjIOzspkCa@makrotopia.org>
Date: Tue, 18 Nov 2025 02:43:55 +0000
From: Daniel Golle <daniel@...rotopia.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Xu Liang <lxu@...linear.com>, 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>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support
On Tue, Nov 11, 2025 at 02:32:38AM +0100, Andrew Lunn wrote:
> On Mon, Nov 10, 2025 at 10:35:00PM +0000, Daniel Golle wrote:
> > Add PHY driver support for Maxlinear 86252 and 86282 switches.
> > The PHYs built-into those switches are just like any other GPY 2.5G PHYs
> > with the exception of the temperature sensor data being encoded in a
> > different way.
>
> Is there a temperature sensor per PHY, or just one for the whole
> package?
>
> Marvell did something similar for there SoHo switches. The temperature
> sensor is mapped to each of internal PHYs register space, but in fact
> there is a single sensor, not one per PHY.
It very much looks like it is also done in the way your are describing.
The temperature reading on all 8 PHYs is almost exactly the same, even
if eg. port 1 and 2 are connected to 2.5G link partners and doing some
traffic and all other ports are disconnected the temperature stays the
same value for all of them.
Should this hence be implemented as a single sensor of the phy package?
>
> > @@ -541,7 +581,7 @@ static int gpy_update_interface(struct phy_device *phydev)
> > /* Interface mode is fixed for USXGMII and integrated PHY */
> > if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
> > phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
> > - return -EINVAL;
> > + return 0;
>
> This change is not obvious. There is no mention of it in the commit
> message. Why has something which was an error become not an error?
The interface mode doesn't need to be updated on PHYs connected with
USXGMII and integrated PHYs, and gpy_update_interface() should just
return 0 in this case rather than -EINVAL, which has wrongly been
introduced by commit 7a495dde27ebc ("net: phy: mxl-gpy: Change
gpy_update_interface() function return type"), as this breaks support
for those PHYs. The result is that read_status() will always return
-EINVAL for those interface modes.
I'll move this change into a separate patch with an appropriate
Fixes:-tag as the before mentioned commit actually breaks things.
Powered by blists - more mailing lists