lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4e68ca40-85b8-4766-9040-edf677afd0f7@redhat.com>
Date: Fri, 2 May 2025 12:51:47 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Niklas Söderlund
 <niklas.soderlund+renesas@...natech.se>,
 Dimitri Fedrau <dima.fedrau@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, 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>,
 Gregor Herburger <gregor.herburger@...tq-group.com>,
 Stefan Eichenberger <eichest@...il.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Kory Maincent <kory.maincent@...tlin.com>
Subject: Re: [PATCH net-next v3] net: phy: marvell-88q2xxx: Enable temperature
 measurement in probe again

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@...natech.se>

Since this is net-next material +1 for the helper.

Also AFAICS this is fixing a net-next regression, so it needs a fixes
tag, too.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ