diff options
author | David Bauer <mail@david-bauer.net> | 2021-06-15 00:15:17 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2021-06-27 13:19:36 +0200 |
commit | 54ed38d5eab4d28cf52e3cf4928f0d2cc3eb7c8e (patch) | |
tree | ff6281917389342e128335db3c5f92d99615e7f7 /target/linux/ramips/patches-5.10/710-at803x.patch | |
parent | 1f5afbab5bbd33c5eff607a26699f64d3f4c11b1 (diff) | |
download | upstream-54ed38d5eab4d28cf52e3cf4928f0d2cc3eb7c8e.tar.gz upstream-54ed38d5eab4d28cf52e3cf4928f0d2cc3eb7c8e.tar.bz2 upstream-54ed38d5eab4d28cf52e3cf4928f0d2cc3eb7c8e.zip |
ramips: fix AR8033 fiber operation
It was reported AR8033 did not work in fiber operation mode on the ER-X.
While the earlier attempt of fixing this mitigated the issue of 1000
Base-X link mode not being supported, it also switched to the copper
page, breaking fiber operation altogether.
Extend the hack adding fiber operation so it does not switch to the
copper page. Also remove the part where the supported link mode bit for
1000 Base-X is removed, as this is required for fiber operation.
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ramips/patches-5.10/710-at803x.patch')
-rw-r--r-- | target/linux/ramips/patches-5.10/710-at803x.patch | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/target/linux/ramips/patches-5.10/710-at803x.patch b/target/linux/ramips/patches-5.10/710-at803x.patch index d15dd92965..ec8f3ba55f 100644 --- a/target/linux/ramips/patches-5.10/710-at803x.patch +++ b/target/linux/ramips/patches-5.10/710-at803x.patch @@ -118,7 +118,23 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; -@@ -744,6 +818,10 @@ static int at803x_read_status(struct phy +@@ -554,6 +628,7 @@ static int at803x_probe(struct phy_devic + return ret; + } + ++#if 0 + /* Some bootloaders leave the fiber page selected. + * Switch to the copper page, as otherwise we read + * the PHY capabilities from the fiber side. +@@ -565,6 +640,7 @@ static int at803x_probe(struct phy_devic + if (ret) + goto err; + } ++#endif + + return 0; + +@@ -744,6 +820,10 @@ static int at803x_read_status(struct phy { int ss, err, old_link = phydev->link; @@ -129,7 +145,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> /* Update the link, but return if there was an error */ err = genphy_update_link(phydev); if (err) -@@ -844,6 +922,12 @@ static int at803x_config_aneg(struct phy +@@ -844,6 +924,12 @@ static int at803x_config_aneg(struct phy { int ret; @@ -142,7 +158,23 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> ret = at803x_config_mdix(phydev, phydev->mdix_ctrl); if (ret < 0) return ret; -@@ -1145,6 +1229,7 @@ static struct phy_driver at803x_driver[] +@@ -943,6 +1029,7 @@ static int at803x_get_features(struct ph + if (err) + return err; + ++#if 0 + if (!at803x_match_phy_id(phydev, ATH8031_PHY_ID)) + return 0; + +@@ -960,6 +1047,7 @@ static int at803x_get_features(struct ph + */ + linkmode_clear_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, + phydev->supported); ++#endif + return 0; + } + +@@ -1173,6 +1261,7 @@ static struct phy_driver at803x_driver[] /* Qualcomm Atheros AR8031/AR8033 */ PHY_ID_MATCH_EXACT(ATH8031_PHY_ID), .name = "Qualcomm Atheros AR8031/AR8033", |