Thread (2 messages) 2 messages, 2 authors, 2018-03-15

Re: [PATCH] net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2018-03-15 14:31:24
Also in: linux-omap, lkml

quoted hunk ↗ jump to hunk
@@ -1014,7 +1014,13 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
 		/* set speed_in input in case RMII mode is used in 100Mbps */
 		if (phy->speed == 100)
 			mac_control |= BIT(15);
-		else if (phy->speed == 10)
+
+		/* in band mode only works in 10Mbps RGMII mode */
+		else if ((phy->speed == 10) &&
+			 ((phy->interface == PHY_INTERFACE_MODE_RGMII) ||
+			 (phy->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
+			 (phy->interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
+			 (phy->interface == PHY_INTERFACE_MODE_RGMII_TXID)))
Please use phy_interface_mode_is_rgmii()

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help