diff mbox series

net: phy: marvell: avoid configuring fiber page for SGMII-to-Copper

Message ID E1eP3Ep-0000ZC-UN@rmk-PC.armlinux.org.uk
State Accepted, archived
Delegated to: David Miller
Headers show
Series net: phy: marvell: avoid configuring fiber page for SGMII-to-Copper | expand

Commit Message

Russell King (Oracle) Dec. 13, 2017, 9:22 a.m. UTC
When in SGMII-to-Copper mode, the fiber page is used for the MAC facing
link, and does not require configuration of the fiber auto-negotiation
settings.  Avoid trying.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Andrew Lunn Dec. 13, 2017, 4:46 p.m. UTC | #1
On Wed, Dec 13, 2017 at 09:22:03AM +0000, Russell King wrote:
> When in SGMII-to-Copper mode, the fiber page is used for the MAC facing
> link, and does not require configuration of the fiber auto-negotiation
> settings.  Avoid trying.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
David Miller Dec. 13, 2017, 9:13 p.m. UTC | #2
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Wed, 13 Dec 2017 09:22:03 +0000

> When in SGMII-to-Copper mode, the fiber page is used for the MAC facing
> link, and does not require configuration of the fiber auto-negotiation
> settings.  Avoid trying.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 1e3996b41af5..710110ead6ad 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -678,6 +678,10 @@  static int m88e1510_config_aneg(struct phy_device *phydev)
 	if (err < 0)
 		goto error;
 
+	/* Do not touch the fiber page if we're in copper->sgmii mode */
+	if (phydev->interface == PHY_INTERFACE_MODE_SGMII)
+		return 0;
+
 	/* Then the fiber link */
 	err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE);
 	if (err < 0)