From: Greg Kroah-Hartman Date: Mon, 20 Jan 2025 13:42:34 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v6.6.73~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6ad2306fe07b8a1c9e1319f577367cb82088ad1;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: net-ethernet-xgbe-re-add-aneg-to-supported-features-in-phy-quirks.patch --- diff --git a/queue-5.4/net-ethernet-xgbe-re-add-aneg-to-supported-features-in-phy-quirks.patch b/queue-5.4/net-ethernet-xgbe-re-add-aneg-to-supported-features-in-phy-quirks.patch new file mode 100644 index 0000000000..8ae7caecc5 --- /dev/null +++ b/queue-5.4/net-ethernet-xgbe-re-add-aneg-to-supported-features-in-phy-quirks.patch @@ -0,0 +1,93 @@ +From 6be7aca91009865d8c2b73589270224a6b6e67ab Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Sun, 12 Jan 2025 22:59:59 +0100 +Subject: net: ethernet: xgbe: re-add aneg to supported features in PHY quirks + +From: Heiner Kallweit + +commit 6be7aca91009865d8c2b73589270224a6b6e67ab upstream. + +In 4.19, before the switch to linkmode bitmaps, PHY_GBIT_FEATURES +included feature bits for aneg and TP/MII ports. + + SUPPORTED_TP | \ + SUPPORTED_MII) + + SUPPORTED_10baseT_Full) + + SUPPORTED_100baseT_Full) + + SUPPORTED_1000baseT_Full) + + PHY_100BT_FEATURES | \ + PHY_DEFAULT_FEATURES) + + PHY_1000BT_FEATURES) + +Referenced commit expanded PHY_GBIT_FEATURES, silently removing +PHY_DEFAULT_FEATURES. The removed part can be re-added by using +the new PHY_GBIT_FEATURES definition. +Not clear to me is why nobody seems to have noticed this issue. + +I stumbled across this when checking what it takes to make +phy_10_100_features_array et al private to phylib. + +Fixes: d0939c26c53a ("net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES") +Cc: stable@vger.kernel.org +Signed-off-by: Heiner Kallweit +Link: https://patch.msgid.link/46521973-7738-4157-9f5e-0bb6f694acba@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 19 ++----------------- + 1 file changed, 2 insertions(+), 17 deletions(-) + +--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +@@ -855,7 +855,6 @@ static void xgbe_phy_free_phy_device(str + + static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata) + { +- __ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, }; + struct xgbe_phy_data *phy_data = pdata->phy_data; + unsigned int phy_id = phy_data->phydev->phy_id; + +@@ -877,14 +876,7 @@ static bool xgbe_phy_finisar_phy_quirks( + phy_write(phy_data->phydev, 0x04, 0x0d01); + phy_write(phy_data->phydev, 0x00, 0x9140); + +- linkmode_set_bit_array(phy_10_100_features_array, +- ARRAY_SIZE(phy_10_100_features_array), +- supported); +- linkmode_set_bit_array(phy_gbit_features_array, +- ARRAY_SIZE(phy_gbit_features_array), +- supported); +- +- linkmode_copy(phy_data->phydev->supported, supported); ++ linkmode_copy(phy_data->phydev->supported, PHY_GBIT_FEATURES); + + phy_support_asym_pause(phy_data->phydev); + +@@ -896,7 +888,6 @@ static bool xgbe_phy_finisar_phy_quirks( + + static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) + { +- __ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, }; + struct xgbe_phy_data *phy_data = pdata->phy_data; + struct xgbe_sfp_eeprom *sfp_eeprom = &phy_data->sfp_eeprom; + unsigned int phy_id = phy_data->phydev->phy_id; +@@ -960,13 +951,7 @@ static bool xgbe_phy_belfuse_phy_quirks( + reg = phy_read(phy_data->phydev, 0x00); + phy_write(phy_data->phydev, 0x00, reg & ~0x00800); + +- linkmode_set_bit_array(phy_10_100_features_array, +- ARRAY_SIZE(phy_10_100_features_array), +- supported); +- linkmode_set_bit_array(phy_gbit_features_array, +- ARRAY_SIZE(phy_gbit_features_array), +- supported); +- linkmode_copy(phy_data->phydev->supported, supported); ++ linkmode_copy(phy_data->phydev->supported, PHY_GBIT_FEATURES); + phy_support_asym_pause(phy_data->phydev); + + netif_dbg(pdata, drv, pdata->netdev, diff --git a/queue-5.4/series b/queue-5.4/series index 73b171feb1..5a9e299fb4 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -65,3 +65,4 @@ hfs-sanity-check-the-root-record.patch kheaders-ignore-silly-rename-files.patch poll_wait-add-mb-to-fix-theoretical-race-between-wai.patch nvmet-propagate-npwg-topology.patch +net-ethernet-xgbe-re-add-aneg-to-supported-features-in-phy-quirks.patch