[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVSMAyxgJSqz+gRk@lunn.ch>
Date: Wed, 29 Sep 2021 17:53:39 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Russell King <rmk+kernel@...linux.org.uk>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Marek Beh__n <kabel@...nel.org>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH v2 net-next] net: phy: marvell10g: add downshift tunable
support
> +static int mv3310_set_downshift(struct phy_device *phydev, u8 ds)
> +{
> + struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
> + u16 val;
> + int err;
> +
> + if (!priv->has_downshift)
> + return -EOPNOTSUPP;
> +
> + if (ds == DOWNSHIFT_DEV_DISABLE)
> + return phy_clear_bits_mmd(phydev, MDIO_MMD_PCS, MV_PCS_DSC1,
> + MV_PCS_DSC1_ENABLE);
> +
> + /* DOWNSHIFT_DEV_DEFAULT_COUNT is confusing. It looks like it should
> + * set the default settings for the PHY. However, it is used for
> + * "ethtool --set-phy-tunable ethN downshift on". The intention is
> + * to enable downshift at a default number of retries. The default
> + * settings for 88x3310 are for two retries with downshift disabled.
> + * So let's use two retries with downshift enabled.
> + */
> + if (ds == DOWNSHIFT_DEV_DEFAULT_COUNT)
> + ds = 2;
That is sensible and explains what is going on. Thanks.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists