Message ID | 20180315064145.7022-1-sz.lin@moxa.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 1b1b78fdc138..3bbf22ed59cf 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -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))) mac_control |= BIT(18); /* In Band mode */ if (priv->rx_pause)