All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: marvell10g: disable temperature sensor on 2110
@ 2020-04-16 14:32 Baruch Siach
  2020-04-16 14:38 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2020-04-16 14:32 UTC (permalink / raw)
  To: Russell King
  Cc: netdev, Andrew Lunn, Florian Fainelli, Heiner Kallweit,
	Baruch Siach, Maxime Chevallier

The 88E2110 temperature sensor is in a different location than 88X3310,
and it has no enable/disable option.

Fixes: 62d01535474b61 ("net: phy: marvell10g: add support for the 88x2110 PHY")
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/net/phy/marvell10g.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 7621badae64d..7c4bc7347d0f 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -164,6 +164,9 @@ static int mv3310_hwmon_config(struct phy_device *phydev, bool enable)
 	u16 val;
 	int ret;
 
+	if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310)
+		return 0;
+
 	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP,
 			    MV_V2_TEMP_UNKNOWN);
 	if (ret < 0)
@@ -188,6 +191,9 @@ static int mv3310_hwmon_probe(struct phy_device *phydev)
 	struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
 	int i, j, ret;
 
+	if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310)
+		return 0;
+
 	priv->hwmon_name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL);
 	if (!priv->hwmon_name)
 		return -ENODEV;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: phy: marvell10g: disable temperature sensor on 2110
  2020-04-16 14:32 [PATCH] net: phy: marvell10g: disable temperature sensor on 2110 Baruch Siach
@ 2020-04-16 14:38 ` Andrew Lunn
  2020-04-16 14:48   ` Baruch Siach
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2020-04-16 14:38 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Russell King, netdev, Florian Fainelli, Heiner Kallweit,
	Maxime Chevallier

On Thu, Apr 16, 2020 at 05:32:36PM +0300, Baruch Siach wrote:
> The 88E2110 temperature sensor is in a different location than 88X3310,
> and it has no enable/disable option.

Hi Buruch

How easy would it be to support the new location? These things can get
warm, specially if there is no heat sink attached. So it would be nice
to support it, if possible.

   Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: phy: marvell10g: disable temperature sensor on 2110
  2020-04-16 14:38 ` Andrew Lunn
@ 2020-04-16 14:48   ` Baruch Siach
  2020-04-16 18:57     ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2020-04-16 14:48 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Russell King, netdev, Florian Fainelli, Heiner Kallweit,
	Maxime Chevallier

Hi Andrew,

On Thu, Apr 16 2020, Andrew Lunn wrote:
> On Thu, Apr 16, 2020 at 05:32:36PM +0300, Baruch Siach wrote:
>> The 88E2110 temperature sensor is in a different location than 88X3310,
>> and it has no enable/disable option.
>
> Hi Buruch
>
> How easy would it be to support the new location? These things can get
> warm, specially if there is no heat sink attached. So it would be nice
> to support it, if possible.

Adding support should not be too hard. I might find some time to work on
this in the next few days.

I think this patch should go to -stable, so it is useful on its
own. Support for 2110 hwmon sensor is net-next material.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: phy: marvell10g: disable temperature sensor on 2110
  2020-04-16 14:48   ` Baruch Siach
@ 2020-04-16 18:57     ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2020-04-16 18:57 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Andrew Lunn, netdev, Florian Fainelli, Heiner Kallweit,
	Maxime Chevallier

On Thu, Apr 16, 2020 at 05:48:20PM +0300, Baruch Siach wrote:
> Hi Andrew,
> 
> On Thu, Apr 16 2020, Andrew Lunn wrote:
> > On Thu, Apr 16, 2020 at 05:32:36PM +0300, Baruch Siach wrote:
> >> The 88E2110 temperature sensor is in a different location than 88X3310,
> >> and it has no enable/disable option.
> >
> > Hi Buruch
> >
> > How easy would it be to support the new location? These things can get
> > warm, specially if there is no heat sink attached. So it would be nice
> > to support it, if possible.
> 
> Adding support should not be too hard. I might find some time to work on
> this in the next few days.
> 
> I think this patch should go to -stable, so it is useful on its
> own. Support for 2110 hwmon sensor is net-next material.

Irrespective of that, we really need some way to test changes to this
driver on the 88E2110 PHYs.  Right now, there's a high chance of
breakage because afaik no one tests the patches I send to netdev on
this, so the only time we find out that something breaks is after the
fact, and your patch shows that it takes many kernel revisions before
breakage is spotted.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-16 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 14:32 [PATCH] net: phy: marvell10g: disable temperature sensor on 2110 Baruch Siach
2020-04-16 14:38 ` Andrew Lunn
2020-04-16 14:48   ` Baruch Siach
2020-04-16 18:57     ` Russell King - ARM Linux admin

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.