From: Vladimir Oltean <vladimir.olt...@nxp.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.olt...@nxp.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

Reply via email to