aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-5.4
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-06-04 15:12:14 +0200
committerDavid Bauer <mail@david-bauer.net>2021-06-08 00:38:28 +0200
commit15167671b0d7cf0c95568dd6f9620db082df5d96 (patch)
tree2f282fa98f8329b63d8a63395a5ce18d8038d8b3 /target/linux/ramips/patches-5.4
parent1412424fc51209480fa4efed9f3f0badc6dcab09 (diff)
downloadupstream-15167671b0d7cf0c95568dd6f9620db082df5d96.tar.gz
upstream-15167671b0d7cf0c95568dd6f9620db082df5d96.tar.bz2
upstream-15167671b0d7cf0c95568dd6f9620db082df5d96.zip
generic: backport at803x fixes
As patches for the AR8031/AR8033 copper page selection were merged upstream, we can backport these patches. This also fixes a PHY capabilities detection issue on the Ubiquiti ER-X-SFP. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ramips/patches-5.4')
-rw-r--r--target/linux/ramips/patches-5.4/991-at803x.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/target/linux/ramips/patches-5.4/991-at803x.patch b/target/linux/ramips/patches-5.4/991-at803x.patch
index 95411211b2..29e79e65d7 100644
--- a/target/linux/ramips/patches-5.4/991-at803x.patch
+++ b/target/linux/ramips/patches-5.4/991-at803x.patch
@@ -23,7 +23,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
#define AT803X_SPECIFIC_STATUS 0x11
#define AT803X_SS_SPEED_MASK (3 << 14)
-@@ -53,9 +55,18 @@
+@@ -52,9 +54,18 @@
#define AT803X_MODE_CFG_MASK 0x0F
#define AT803X_MODE_CFG_SGMII 0x01
@@ -42,7 +42,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
#define AT803X_DEBUG_REG_0 0x00
#define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15)
-@@ -243,10 +254,72 @@ static int at803x_resume(struct phy_devi
+@@ -274,12 +285,73 @@ static int at803x_resume(struct phy_devi
return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0);
}
@@ -105,17 +105,18 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
{
struct device *dev = &phydev->mdio.dev;
struct at803x_priv *priv;
-+ int ret;
-+
+ int ret;
+
+ if (at803x_mode(phydev) == AT803X_MODE_FIBER) {
+ ret = phy_sfp_probe(phydev, &at803x_sfp_ops);
+ if (ret < 0)
+ return ret;
+ }
-
++
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
-@@ -394,6 +467,10 @@ static int at803x_read_status(struct phy
+ return -ENOMEM;
+@@ -415,6 +487,10 @@ static int at803x_read_status(struct phy
{
int ss, err, old_link = phydev->link;
@@ -126,7 +127,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)
-@@ -448,6 +525,19 @@ static int at803x_read_status(struct phy
+@@ -469,6 +545,19 @@ static int at803x_read_status(struct phy
return 0;
}
@@ -146,7 +147,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
static struct phy_driver at803x_driver[] = {
{
/* ATHEROS 8035 */
-@@ -461,6 +551,7 @@ static struct phy_driver at803x_driver[]
+@@ -482,6 +571,7 @@ static struct phy_driver at803x_driver[]
.suspend = at803x_suspend,
.resume = at803x_resume,
/* PHY_GBIT_FEATURES */