diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-04-22 01:59:38 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-04-22 17:21:28 +0200 |
commit | aa8ba5166eded12258c66393a77c84d7030320c2 (patch) | |
tree | 44aec180820b73f6200107396beebe1fe37fe4e5 /target/linux/generic/backport-5.10 | |
parent | 7643d95bb31b2cc7412f3738be44a18fa8312cae (diff) | |
download | upstream-aa8ba5166eded12258c66393a77c84d7030320c2.tar.gz upstream-aa8ba5166eded12258c66393a77c84d7030320c2.tar.bz2 upstream-aa8ba5166eded12258c66393a77c84d7030320c2.zip |
generic: 5.10: replace pending 730-net-phy-at803x-fix... with upstream
Replace pending 730-net-phy-at803x-fix-feature-detection.patch with
upstream version and move it to backport.
Refresh other related patch while moving it.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/generic/backport-5.10')
10 files changed, 92 insertions, 24 deletions
diff --git a/target/linux/generic/backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch b/target/linux/generic/backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch new file mode 100644 index 0000000000..a977db0b6c --- /dev/null +++ b/target/linux/generic/backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch @@ -0,0 +1,68 @@ +From b856150c8098f12996ee81c3ab2a65adbaeeb3ec Mon Sep 17 00:00:00 2001 +From: David Bauer <mail@david-bauer.net> +Date: Sun, 27 Jun 2021 12:16:07 +0200 +Subject: [PATCH] net: phy: at803x: mask 1000 Base-X link mode + +AR8031/AR8033 have different status registers for copper +and fiber operation. However, the extended status register +is the same for both operation modes. + +As a result of that, ESTATUS_1000_XFULL is set to 1 even when +operating in copper TP mode. + +Remove this mode from the supported link modes, as this driver +currently only supports copper operation. + +Signed-off-by: David Bauer <mail@david-bauer.net> +Reviewed-by: Andrew Lunn <andrew@lunn.ch> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/phy/at803x.c | 30 +++++++++++++++++++++++++++++- + 1 file changed, 29 insertions(+), 1 deletion(-) + +--- a/drivers/net/phy/at803x.c ++++ b/drivers/net/phy/at803x.c +@@ -583,6 +583,34 @@ static void at803x_remove(struct phy_dev + regulator_disable(priv->vddio); + } + ++static int at803x_get_features(struct phy_device *phydev) ++{ ++ int err; ++ ++ err = genphy_read_abilities(phydev); ++ if (err) ++ return err; ++ ++ if (!at803x_match_phy_id(phydev, ATH8031_PHY_ID)) ++ return 0; ++ ++ /* AR8031/AR8033 have different status registers ++ * for copper and fiber operation. However, the ++ * extended status register is the same for both ++ * operation modes. ++ * ++ * As a result of that, ESTATUS_1000_XFULL is set ++ * to 1 even when operating in copper TP mode. ++ * ++ * Remove this mode from the supported link modes, ++ * as this driver currently only supports copper ++ * operation. ++ */ ++ linkmode_clear_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, ++ phydev->supported); ++ return 0; ++} ++ + static int at803x_clk_out_config(struct phy_device *phydev) + { + struct at803x_priv *priv = phydev->priv; +@@ -1156,7 +1184,7 @@ static struct phy_driver at803x_driver[] + .resume = at803x_resume, + .read_page = at803x_read_page, + .write_page = at803x_write_page, +- /* PHY_GBIT_FEATURES */ ++ .get_features = at803x_get_features, + .read_status = at803x_read_status, + .aneg_done = at803x_aneg_done, + .ack_interrupt = &at803x_ack_interrupt, diff --git a/target/linux/generic/backport-5.10/735-v5.14-25-net-phy-add-support-for-qca8k-switch-internal-PHY-in.patch b/target/linux/generic/backport-5.10/735-v5.14-25-net-phy-add-support-for-qca8k-switch-internal-PHY-in.patch index 20325f564d..0b03c78bdc 100644 --- a/target/linux/generic/backport-5.10/735-v5.14-25-net-phy-add-support-for-qca8k-switch-internal-PHY-in.patch +++ b/target/linux/generic/backport-5.10/735-v5.14-25-net-phy-add-support-for-qca8k-switch-internal-PHY-in.patch @@ -170,7 +170,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static int at803x_suspend(struct phy_device *phydev) { int value; -@@ -1102,6 +1191,34 @@ static int at803x_cable_test_start(struc +@@ -1130,6 +1219,34 @@ static int at803x_cable_test_start(struc return 0; } @@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static struct phy_driver at803x_driver[] = { { /* Qualcomm Atheros AR8035 */ -@@ -1198,7 +1315,20 @@ static struct phy_driver at803x_driver[] +@@ -1226,7 +1343,20 @@ static struct phy_driver at803x_driver[] .read_status = at803x_read_status, .soft_reset = genphy_soft_reset, .config_aneg = at803x_config_aneg, diff --git a/target/linux/generic/backport-5.10/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch b/target/linux/generic/backport-5.10/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch index 16aa0711ad..e356d549bb 100644 --- a/target/linux/generic/backport-5.10/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch +++ b/target/linux/generic/backport-5.10/742-v5.16-net-phy-at803x-add-support-for-qca-8327-internal-phy.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c -@@ -1328,6 +1328,19 @@ static struct phy_driver at803x_driver[] +@@ -1356,6 +1356,19 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, @@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> }, }; module_phy_driver(at803x_driver); -@@ -1338,6 +1351,8 @@ static struct mdio_device_id __maybe_unu +@@ -1366,6 +1379,8 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) }, { PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, { PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, diff --git a/target/linux/generic/backport-5.10/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch b/target/linux/generic/backport-5.10/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch index c82bf913a0..f13b80b531 100644 --- a/target/linux/generic/backport-5.10/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch +++ b/target/linux/generic/backport-5.10/745-v5.16-01-net-phy-at803x-add-support-for-qca-8327-A-variant.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> #define QCA8337_PHY_ID 0x004dd036 #define QCA8K_PHY_ID_MASK 0xffffffff -@@ -1329,10 +1330,23 @@ static struct phy_driver at803x_driver[] +@@ -1357,10 +1358,23 @@ static struct phy_driver at803x_driver[] .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, }, { @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* PHY_GBIT_FEATURES */ .probe = at803x_probe, .flags = PHY_IS_INTERNAL, -@@ -1352,7 +1366,8 @@ static struct mdio_device_id __maybe_unu +@@ -1380,7 +1394,8 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, { PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, { PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) }, diff --git a/target/linux/generic/backport-5.10/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch b/target/linux/generic/backport-5.10/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch index be24fd5cf7..25b05aa33f 100644 --- a/target/linux/generic/backport-5.10/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch +++ b/target/linux/generic/backport-5.10/745-v5.16-02-net-phy-at803x-add-resume-suspend-function-to-qca83x.patch @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c -@@ -1329,6 +1329,8 @@ static struct phy_driver at803x_driver[] +@@ -1357,6 +1357,8 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> }, { /* QCA8327-A from switch QCA8327-AL1A */ .phy_id = QCA8327_A_PHY_ID, -@@ -1342,6 +1344,8 @@ static struct phy_driver at803x_driver[] +@@ -1370,6 +1372,8 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, @@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> }, { /* QCA8327-B from switch QCA8327-BL1A */ .phy_id = QCA8327_B_PHY_ID, -@@ -1355,6 +1359,8 @@ static struct phy_driver at803x_driver[] +@@ -1383,6 +1387,8 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, diff --git a/target/linux/generic/backport-5.10/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch b/target/linux/generic/backport-5.10/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch index 23f574c76f..8e53e0e639 100644 --- a/target/linux/generic/backport-5.10/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch +++ b/target/linux/generic/backport-5.10/745-v5.16-03-net-phy-at803x-fix-spacing-and-improve-name-for-83xx.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c -@@ -1318,47 +1318,47 @@ static struct phy_driver at803x_driver[] +@@ -1346,47 +1346,47 @@ static struct phy_driver at803x_driver[] .config_aneg = at803x_config_aneg, }, { /* QCA8337 */ diff --git a/target/linux/generic/backport-5.10/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch b/target/linux/generic/backport-5.10/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch index 5dfe27dd24..1f803e582b 100644 --- a/target/linux/generic/backport-5.10/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch +++ b/target/linux/generic/backport-5.10/746-v5.16-01-net-phy-at803x-fix-resume-for-QCA8327-phy.patch @@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> #define AT803X_DEBUG_REG_1F 0x1F #define AT803X_DEBUG_PLL_ON BIT(2) -@@ -1220,6 +1225,58 @@ static int qca83xx_config_init(struct ph +@@ -1248,6 +1253,58 @@ static int qca83xx_config_init(struct ph return 0; } @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static struct phy_driver at803x_driver[] = { { /* Qualcomm Atheros AR8035 */ -@@ -1329,8 +1386,8 @@ static struct phy_driver at803x_driver[] +@@ -1357,8 +1414,8 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, @@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> }, { /* QCA8327-A from switch QCA8327-AL1A */ .phy_id = QCA8327_A_PHY_ID, -@@ -1344,8 +1401,8 @@ static struct phy_driver at803x_driver[] +@@ -1372,8 +1429,8 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, @@ -118,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> }, { /* QCA8327-B from switch QCA8327-BL1A */ .phy_id = QCA8327_B_PHY_ID, -@@ -1359,8 +1416,8 @@ static struct phy_driver at803x_driver[] +@@ -1387,8 +1444,8 @@ static struct phy_driver at803x_driver[] .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, diff --git a/target/linux/generic/backport-5.10/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch b/target/linux/generic/backport-5.10/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch index aeb43e2f67..b82b6595fa 100644 --- a/target/linux/generic/backport-5.10/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch +++ b/target/linux/generic/backport-5.10/746-v5.16-02-net-phy-at803x-add-DAC-amplitude-fix-for-8327-phy.patch @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) #define AT803X_DEBUG_REG_5 0x05 -@@ -1222,9 +1224,37 @@ static int qca83xx_config_init(struct ph +@@ -1250,9 +1252,37 @@ static int qca83xx_config_init(struct ph break; } @@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static int qca83xx_resume(struct phy_device *phydev) { int ret, val; -@@ -1379,6 +1409,7 @@ static struct phy_driver at803x_driver[] +@@ -1407,6 +1437,7 @@ static struct phy_driver at803x_driver[] .phy_id_mask = QCA8K_PHY_ID_MASK, .name = "Qualcomm Atheros 8337 internal PHY", /* PHY_GBIT_FEATURES */ @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .probe = at803x_probe, .flags = PHY_IS_INTERNAL, .config_init = qca83xx_config_init, -@@ -1394,6 +1425,7 @@ static struct phy_driver at803x_driver[] +@@ -1422,6 +1453,7 @@ static struct phy_driver at803x_driver[] .phy_id_mask = QCA8K_PHY_ID_MASK, .name = "Qualcomm Atheros 8327-A internal PHY", /* PHY_GBIT_FEATURES */ @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> .probe = at803x_probe, .flags = PHY_IS_INTERNAL, .config_init = qca83xx_config_init, -@@ -1409,6 +1441,7 @@ static struct phy_driver at803x_driver[] +@@ -1437,6 +1469,7 @@ static struct phy_driver at803x_driver[] .phy_id_mask = QCA8K_PHY_ID_MASK, .name = "Qualcomm Atheros 8327-B internal PHY", /* PHY_GBIT_FEATURES */ diff --git a/target/linux/generic/backport-5.10/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch b/target/linux/generic/backport-5.10/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch index 2352fa0e44..023d203c46 100644 --- a/target/linux/generic/backport-5.10/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch +++ b/target/linux/generic/backport-5.10/746-v5.16-03-net-phy-at803x-enable-prefer-master-for-83xx-interna.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c -@@ -1233,6 +1233,9 @@ static int qca83xx_config_init(struct ph +@@ -1261,6 +1261,9 @@ static int qca83xx_config_init(struct ph at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, QCA8327_DEBUG_MANU_CTRL_EN, 0); diff --git a/target/linux/generic/backport-5.10/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch b/target/linux/generic/backport-5.10/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch index 9c28a893f1..f54dc4276a 100644 --- a/target/linux/generic/backport-5.10/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch +++ b/target/linux/generic/backport-5.10/746-v5.16-04-net-phy-at803x-better-describe-debug-regs.patch @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> AT803X_DEBUG_TX_CLK_DLY_EN, 0); } -@@ -1208,9 +1208,9 @@ static int qca83xx_config_init(struct ph +@@ -1236,9 +1236,9 @@ static int qca83xx_config_init(struct ph switch (switch_revision) { case 1: /* For 100M waveform */ @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> break; case 2: -@@ -1218,8 +1218,8 @@ static int qca83xx_config_init(struct ph +@@ -1246,8 +1246,8 @@ static int qca83xx_config_init(struct ph fallthrough; case 4: phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_AZ_DEBUG, 0x803f); @@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3C, 0x6000); break; } -@@ -1230,7 +1230,7 @@ static int qca83xx_config_init(struct ph +@@ -1258,7 +1258,7 @@ static int qca83xx_config_init(struct ph */ if (phydev->drv->phy_id == QCA8327_A_PHY_ID || phydev->drv->phy_id == QCA8327_B_PHY_ID) @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> QCA8327_DEBUG_MANU_CTRL_EN, 0); /* Following original QCA sourcecode set port to prefer master */ -@@ -1248,12 +1248,12 @@ static void qca83xx_link_change_notify(s +@@ -1276,12 +1276,12 @@ static void qca83xx_link_change_notify(s /* Set DAC Amplitude adjustment to +6% for 100m on link running */ if (phydev->state == PHY_RUNNING) { if (phydev->speed == SPEED_100) @@ -116,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> QCA8327_DEBUG_MANU_CTRL_EN, 0); } } -@@ -1300,7 +1300,7 @@ static int qca83xx_suspend(struct phy_de +@@ -1328,7 +1328,7 @@ static int qca83xx_suspend(struct phy_de phy_modify(phydev, MII_BMCR, mask, 0); } |