All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitri Fedrau <dima.fedrau@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"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>,
	"Gregor Herburger" <gregor.herburger@ew.tq-group.com>,
	"Stefan Eichenberger" <eichest@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Kory Maincent" <kory.maincent@bootlin.com>
Subject: Re: [PATCH net-next v3] net: phy: marvell-88q2xxx: Enable temperature measurement in probe again
Date: Mon, 5 May 2025 11:17:56 +0200	[thread overview]
Message-ID: <20250505091756.GA9785@debian> (raw)
In-Reply-To: <4e68ca40-85b8-4766-9040-edf677afd0f7@redhat.com>

Hi Paolo,

On Fri, May 02, 2025 at 12:51:47PM +0200, Paolo Abeni wrote:
> On 4/29/25 10:03 PM, Niklas Söderlund wrote:
> >> @@ -765,6 +768,13 @@ static int mv88q2xxx_hwmon_probe(struct phy_device *phydev)
> >>  	struct mv88q2xxx_priv *priv = phydev->priv;
> >>  	struct device *dev = &phydev->mdio.dev;
> >>  	struct device *hwmon;
> >> +	int ret;
> >> +
> >> +	/* Enable temperature sense */
> >> +	ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, MDIO_MMD_PCS_MV_TEMP_SENSOR2,
> >> +			     MDIO_MMD_PCS_MV_TEMP_SENSOR2_DIS_MASK, 0);
> >> +	if (ret < 0)
> >> +		return ret;
> > 
> > nit: I wonder if it make sens to create a helper function to enable the 
> > sensor? My worry being this procedure growing in the future and only 
> > being fixed in one location and not the other. It would also reduce code 
> > duplication and could be stubbed to be compiled out with the existing 
> > IS_ENABLED(CONFIG_HWMON) guard for other hwmon functions.
> > 
> > That being said I tested this with mv88q211x and the temp sensor and PHY 
> > keeps working as expected.
> > 
> > Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> 
> Since this is net-next material +1 for the helper.
>
Agreed.

> Also AFAICS this is fixing a net-next regression, so it needs a fixes
> tag, too.
> 
We discussed it here:
https://lore.kernel.org/netdev/48c4cd14-be56-438e-9561-c85b0245178c@lunn.ch/

Andrews opinion was the change is rather archtitecture then a fix.

Best regards,
Dimitri Fedrau

  reply	other threads:[~2025-05-05  9:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  6:54 [PATCH net-next v3] net: phy: marvell-88q2xxx: Enable temperature measurement in probe again Dimitri Fedrau
2025-04-29 20:03 ` Niklas Söderlund
2025-05-02 10:51   ` Paolo Abeni
2025-05-05  9:17     ` Dimitri Fedrau [this message]
2025-05-05  9:10   ` Dimitri Fedrau

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=20250505091756.GA9785@debian \
    --to=dima.fedrau@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eichest@gmail.com \
    --cc=gregor.herburger@ew.tq-group.com \
    --cc=hkallweit1@gmail.com \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.