From: Vladimir Oltean <[email protected]>

The PCS doesn't need to be reset, we just need to clear BMCR_ANENABLE.
Since the only writable fields of MII_BMCR in this PCS are:

- BMCR_RESET
- BMCR_LOOPBACK
- BMCR_ANENABLE
- BMCR_PDOWN
- BMCR_ISOLATE
- BMCR_ANRESTART

it's safe to write zero to disable in-band AN.

Signed-off-by: Vladimir Oltean <[email protected]>
---
 drivers/net/dsa/ocelot/felix_vsc9959.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c 
b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 7d2673dab7d3..dba62c609efc 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -807,7 +807,7 @@ static void vsc9959_pcs_init_sgmii(struct phy_device *pcs,
                        if_mode |= ENETC_PCS_IF_MODE_DUPLEX_HALF;
 
                phy_write(pcs, ENETC_PCS_IF_MODE, if_mode);
-               phy_write(pcs, MII_BMCR, BMCR_RESET);
+               phy_write(pcs, MII_BMCR, 0);
        }
 }
 
@@ -844,7 +844,7 @@ static void vsc9959_pcs_init_2500basex(struct phy_device 
*pcs,
                if_mode |= ENETC_PCS_IF_MODE_DUPLEX_HALF;
 
        phy_write(pcs, ENETC_PCS_IF_MODE, if_mode);
-       phy_write(pcs, MII_BMCR, BMCR_RESET);
+       phy_write(pcs, MII_BMCR, 0);
 }
 
 static void vsc9959_pcs_init_usxgmii(struct phy_device *pcs,
-- 
2.25.1

Reply via email to