net: ethernet: xgbe: re-add aneg to supported features in PHY quirks
Subsystems (3)
PATCH 1/1 net: ethernet: xgbe: re-add aneg to supported features in PHY quirks
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.
--- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +2 -17
@@ -923,7 +923,6 @@ static void xgbe_phy_free_phy_device(struct xgbe_prv_data *pdata)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;
@@ -945,14 +944,7 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)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);
@@ -964,7 +956,6 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)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;
@@ -1028,13 +1019,7 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) 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,
Signature · 1 line
2.47.1
Quoted 73 lines · Heiner Kallweit
In 4.19, before the switch to linkmode bitmaps,
PHY_GBIT_FEATURESincluded 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 removingPHY_DEFAULT_FEATURES. The removed part can be re-added by using the newPHY_GBIT_FEATURESdefinition.
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_arrayet al private to phylib.Fixes d0939c26c53a ("net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES")Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-)drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +1
-11@@ -923,7 +923,6 @@ static void xgbe_phy_free_phy_device(struct xgbe_prv_data *pdata)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;@@ -945,14 +944,7 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)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);@@ -964,7 +956,6 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)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;@@ -1028,13 +1019,7 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) reg =phy_read (phy_data->phydev,0x00 );phy_write (phy_data->phydev,0x00 , reg & ~0x00800 ); - linkmode_set_bit_array(phy_10_100_features_array,
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) · line 1025
Quoted 10 lines
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +1
-6-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,
+ Shyam Sundar S K <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Sun, 12 Jan 2025 22:59:59 +0100 you wrote:
In 4.19, before the switch to linkmode bitmaps,
PHY_GBIT_FEATURESincluded feature bits for aneg and TP/MII ports.SUPPORTED_TP | \ SUPPORTED_MII) SUPPORTED_10baseT_Full)[...]
Here is the summary with links:
- [net] net: ethernet: xgbe: re-add aneg to supported features in PHY quirks
https://git.kernel.org/netdev/net/c/6be7aca91009
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html