[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1af7fa44-714d-4b0b-bcc8-1b92d966e603@intel.com>
Date: Wed, 12 Feb 2025 15:14:43 +0100
From: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
To: Heiner Kallweit <hkallweit1@...il.com>, Andrew Lunn
<andrew+netdev@...n.ch>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, David Miller
<davem@...emloft.net>, Simon Horman <horms@...nel.org>, Iyappan Subramanian
<iyappan@...amperecomputing.com>, Keyur Chudgar
<keyur@...amperecomputing.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next] ixgene-v2: prepare for phylib stop exporting
phy_10_100_features_array
On 2/12/2025 7:32 AM, Heiner Kallweit wrote:
> As part of phylib cleanup we plan to stop exporting the feature arrays.
> So explicitly remove the modes not supported by the MAC. The media type
> bits don't have any impact on kernel behavior, so don't touch them.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
> v2:
> - use phy_remove_link_mode()
> ---
> drivers/net/ethernet/apm/xgene-v2/mdio.c | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/apm/xgene-v2/mdio.c b/drivers/net/ethernet/apm/xgene-v2/mdio.c
> index eba06831a..6a17045a5 100644
> --- a/drivers/net/ethernet/apm/xgene-v2/mdio.c
> +++ b/drivers/net/ethernet/apm/xgene-v2/mdio.c
> @@ -97,7 +97,6 @@ void xge_mdio_remove(struct net_device *ndev)
>
> int xge_mdio_config(struct net_device *ndev)
> {
> - __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
> struct xge_pdata *pdata = netdev_priv(ndev);
> struct device *dev = &pdata->pdev->dev;
> struct mii_bus *mdio_bus;
> @@ -137,17 +136,12 @@ int xge_mdio_config(struct net_device *ndev)
> goto err;
> }
>
> - linkmode_set_bit_array(phy_10_100_features_array,
> - ARRAY_SIZE(phy_10_100_features_array),
> - mask);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, mask);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_AUI_BIT, mask);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_MII_BIT, mask);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, mask);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_BNC_BIT, mask);
> -
> - linkmode_andnot(phydev->supported, phydev->supported, mask);
> - linkmode_copy(phydev->advertising, phydev->supported);
> + phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT);
> + phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT);
> + phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT);
> + phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Full_BIT);
> + phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
> +
> pdata->phy_speed = SPEED_UNKNOWN;
>
> return 0;
Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
Powered by blists - more mailing lists