netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Xu Liang <lxu@maxlinear.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support
Date: Tue, 18 Nov 2025 02:43:55 +0000	[thread overview]
Message-ID: <aRvdaxBjIOzspkCa@makrotopia.org> (raw)
In-Reply-To: <e064f831-1fe9-42d2-96fc-d901c5be66a4@lunn.ch>

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.

  reply	other threads:[~2025-11-18  2:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 22:33 [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C Daniel Golle
2025-11-10 22:35 ` [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support Daniel Golle
2025-11-11  1:32   ` Andrew Lunn
2025-11-18  2:43     ` Daniel Golle [this message]
2025-11-18 16:44       ` Andrew Lunn
2025-11-11 16:33 ` [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aRvdaxBjIOzspkCa@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).