[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200625152331.3784018-2-olteanv@gmail.com>
Date: Thu, 25 Jun 2020 18:23:25 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: davem@...emloft.net, netdev@...r.kernel.org
Cc: andrew@...n.ch, f.fainelli@...il.com, vivien.didelot@...il.com,
claudiu.manoil@....com, alexandru.marginean@....com,
ioana.ciornei@....com, linux@...linux.org.uk
Subject: [PATCH net-next 1/7] net: dsa: felix: stop writing to read-only fields in MII_BMCR
From: Vladimir Oltean <vladimir.oltean@....com>
It looks like BMCR_SPEED and BMCR_DUPLEX are read-only, since they are
actually configured through the vendor-specific IF_MODE (0x14) register.
So, don't perform bogus writes to these fields, giving the impression
that those writes do something.
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
drivers/net/dsa/ocelot/felix_vsc9959.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 2067776773f7..3269c76b59ff 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -845,10 +845,7 @@ static void vsc9959_pcs_init_sgmii(struct phy_device *pcs,
ENETC_PCS_IF_MODE_SGMII_EN |
ENETC_PCS_IF_MODE_SGMII_SPEED(speed));
- /* Yes, not a mistake: speed is given by IF_MODE. */
- phy_write(pcs, MII_BMCR, BMCR_RESET |
- BMCR_SPEED1000 |
- BMCR_FULLDPLX);
+ phy_write(pcs, MII_BMCR, BMCR_RESET);
}
}
@@ -882,9 +879,7 @@ static void vsc9959_pcs_init_2500basex(struct phy_device *pcs,
ENETC_PCS_IF_MODE_SGMII_EN |
ENETC_PCS_IF_MODE_SGMII_SPEED(ENETC_PCS_SPEED_2500));
- phy_write(pcs, MII_BMCR, BMCR_SPEED1000 |
- BMCR_FULLDPLX |
- BMCR_RESET);
+ phy_write(pcs, MII_BMCR, BMCR_RESET);
}
static void vsc9959_pcs_init_usxgmii(struct phy_device *pcs,
--
2.25.1
Powered by blists - more mailing lists