2019-04-11 15:59:44 +00:00
|
|
|
--- a/drivers/net/phy/at803x.c
|
|
|
|
+++ b/drivers/net/phy/at803x.c
|
2020-01-24 10:20:03 +00:00
|
|
|
@@ -391,6 +391,13 @@ static int at803x_aneg_done(struct phy_d
|
2019-04-11 15:59:44 +00:00
|
|
|
if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) {
|
|
|
|
pr_warn("803x_aneg_done: SGMII link is not ok\n");
|
|
|
|
aneg_done = 0;
|
|
|
|
+#ifdef CONFIG_OF_MDIO
|
|
|
|
+ if (phydev->mdio.dev.of_node &&
|
|
|
|
+ of_property_read_bool(phydev->mdio.dev.of_node,
|
|
|
|
+ "at803x-override-sgmii-link-check")) {
|
|
|
|
+ aneg_done = 1;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
/* switch back to copper page */
|
|
|
|
phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr | AT803X_BT_BX_REG_SEL);
|