diff options
author | John Crispin <john@phrozen.org> | 2018-08-09 15:59:41 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-08-22 08:09:00 +0200 |
commit | 318e19ba6755105bb6cc19937d8fff26cbd2cc6f (patch) | |
tree | 2f7c96140932a2770fb767141c7d1e93d29127b0 /target/linux/ar71xx/patches-4.14/903-at803x-add-sgmii-aneg-override-pdata.patch | |
parent | e5f56c07d7fab9a6f2201f4100b593349b8ef67d (diff) | |
download | upstream-318e19ba6755105bb6cc19937d8fff26cbd2cc6f.tar.gz upstream-318e19ba6755105bb6cc19937d8fff26cbd2cc6f.tar.bz2 upstream-318e19ba6755105bb6cc19937d8fff26cbd2cc6f.zip |
ar71xx: add v4.14 support
adds v4.14 patches for testing but leaves v4.9 as default for now.
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ar71xx/patches-4.14/903-at803x-add-sgmii-aneg-override-pdata.patch')
-rw-r--r-- | target/linux/ar71xx/patches-4.14/903-at803x-add-sgmii-aneg-override-pdata.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-4.14/903-at803x-add-sgmii-aneg-override-pdata.patch b/target/linux/ar71xx/patches-4.14/903-at803x-add-sgmii-aneg-override-pdata.patch new file mode 100644 index 0000000000..9c922d155d --- /dev/null +++ b/target/linux/ar71xx/patches-4.14/903-at803x-add-sgmii-aneg-override-pdata.patch @@ -0,0 +1,42 @@ +Index: linux-4.9.111/drivers/net/phy/at803x.c +=================================================================== +--- linux-4.9.111.orig/drivers/net/phy/at803x.c ++++ linux-4.9.111/drivers/net/phy/at803x.c +@@ -461,12 +461,15 @@ static void at803x_link_change_notify(st + + static int at803x_aneg_done(struct phy_device *phydev) + { ++ struct at803x_platform_data *pdata; + int ccr; + + int aneg_done = genphy_aneg_done(phydev); + if (aneg_done != BMSR_ANEGCOMPLETE) + return aneg_done; + ++ pdata = dev_get_platdata(&phydev->mdio.dev); ++ + /* + * in SGMII mode, if copper side autoneg is successful, + * also check SGMII side autoneg result +@@ -481,7 +484,8 @@ static int at803x_aneg_done(struct phy_d + /* check if the SGMII link is OK. */ + 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; ++ if (!pdata || !pdata->override_sgmii_aneg) ++ aneg_done = 0; + } + /* switch back to copper page */ + phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr | AT803X_BT_BX_REG_SEL); +Index: linux-4.9.111/include/linux/platform_data/phy-at803x.h +=================================================================== +--- linux-4.9.111.orig/include/linux/platform_data/phy-at803x.h ++++ linux-4.9.111/include/linux/platform_data/phy-at803x.h +@@ -7,6 +7,7 @@ struct at803x_platform_data { + int enable_rgmii_rx_delay:1; + int fixup_rgmii_tx_delay:1; + int has_reset_gpio:1; ++ int override_sgmii_aneg:1; + int reset_gpio; + }; + |