From aa8ba5166eded12258c66393a77c84d7030320c2 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 22 Apr 2023 01:59:38 +0200 Subject: [PATCH] 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 --- ...hy-at803x-mask-1000-Base-X-link-mode.patch} | 18 ++++++++++-------- ...port-for-qca8k-switch-internal-PHY-in.patch | 4 ++-- ...add-support-for-qca-8327-internal-phy.patch | 4 ++-- ...3x-add-support-for-qca-8327-A-variant.patch | 4 ++-- ...add-resume-suspend-function-to-qca83x.patch | 6 +++--- ...fix-spacing-and-improve-name-for-83xx.patch | 2 +- ...phy-at803x-fix-resume-for-QCA8327-phy.patch | 8 ++++---- ...3x-add-DAC-amplitude-fix-for-8327-phy.patch | 8 ++++---- ...enable-prefer-master-for-83xx-interna.patch | 2 +- ...phy-at803x-better-describe-debug-regs.patch | 10 +++++----- 10 files changed, 34 insertions(+), 32 deletions(-) rename target/linux/generic/{pending-5.10/730-net-phy-at803x-fix-feature-detection.patch => backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch} (75%) diff --git a/target/linux/generic/pending-5.10/730-net-phy-at803x-fix-feature-detection.patch b/target/linux/generic/backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch similarity index 75% rename from target/linux/generic/pending-5.10/730-net-phy-at803x-fix-feature-detection.patch rename to target/linux/generic/backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch index c49bb19601a..a977db0b6c9 100644 --- a/target/linux/generic/pending-5.10/730-net-phy-at803x-fix-feature-detection.patch +++ b/target/linux/generic/backport-5.10/729-v5.14-net-phy-at803x-mask-1000-Base-X-link-mode.patch @@ -1,7 +1,7 @@ -From 97ca310aa18a93329ef5cd68c20de89761962f45 Mon Sep 17 00:00:00 2001 +From b856150c8098f12996ee81c3ab2a65adbaeeb3ec Mon Sep 17 00:00:00 2001 From: David Bauer -Date: Sun, 13 Jun 2021 12:19:36 +0200 -Subject: [PATCH] net: phy: at803x: fix feature detection +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 @@ -14,14 +14,16 @@ Remove this mode from the supported link modes, as this driver currently only supports copper operation. Signed-off-by: David Bauer +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller --- 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 -@@ -1032,6 +1032,34 @@ static int at803x_set_tunable(struct phy - } +@@ -583,6 +583,34 @@ static void at803x_remove(struct phy_dev + regulator_disable(priv->vddio); } +static int at803x_get_features(struct phy_device *phydev) @@ -52,10 +54,10 @@ Signed-off-by: David Bauer + return 0; +} + - static int at803x_cable_test_result_trans(u16 status) + static int at803x_clk_out_config(struct phy_device *phydev) { - switch (FIELD_GET(AT803X_CDT_STATUS_STAT_MASK, status)) { -@@ -1364,7 +1392,7 @@ static struct phy_driver at803x_driver[] + 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, 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 20325f564d4..0b03c78bdc8 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 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 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 16aa0711ad7..e356d549bbb 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 --- 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 }, }; 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 c82bf913a09..f13b80b5312 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 #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 /* 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 be24fd5cf7b..25b05aa33f7 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 --- 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 }, { /* 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 }, { /* 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 23f574c76fe..8e53e0e6396 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 --- 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 5dfe27dd24d..1f803e582b8 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 #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 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 }, { /* 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 }, { /* 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 aeb43e2f67d..b82b6595faa 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 #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 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 .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 .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 2352fa0e44e..023d203c46e 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 --- 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 9c28a893f16..f54dc4276a4 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 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 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 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 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 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); }