Browse Source

net: phy: dp83867: enable robust auto-mdix

CFG3[9] Robust Auto-MDIX option allows significantly improve link detection
in case dp83867 is configured in manual mode and reduce link detection
time.
DM says: "If link partners are configured to operational modes that are not
supported by normal Auto MDI/MDIX mode (like Auto-Neg versus Force
100Base-TX or Force 100Base-TX versus Force 100Base-TX), this Robust Auto
MDI/MDIX mode allows MDI/MDIX resolution and prevents deadlock."

Hence, enable this option by default as there are no known reasons not to do so.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Grygorii Strashko 6 years ago
parent
commit
87e26407b6
1 changed files with 5 additions and 4 deletions
  1. 5 4
      drivers/net/phy/dp83867.c

+ 5 - 4
drivers/net/phy/dp83867.c

@@ -297,12 +297,13 @@ static int dp83867_config_init(struct phy_device *phydev)
 		}
 	}
 
+	val = phy_read(phydev, DP83867_CFG3);
+
 	/* Enable Interrupt output INT_OE in CFG3 register */
-	if (phy_interrupt_is_valid(phydev)) {
-		val = phy_read(phydev, DP83867_CFG3);
+	if (phy_interrupt_is_valid(phydev))
 		val |= BIT(7);
-		phy_write(phydev, DP83867_CFG3, val);
-	}
+	val |= BIT(9);
+	phy_write(phydev, DP83867_CFG3, val);
 
 	if (dp83867->port_mirroring != DP83867_PORT_MIRROING_KEEP)
 		dp83867_config_port_mirroring(phydev);