[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACT4oufqR100dshYZXw76MOvmkgNmSfViAwcktK6b2JMENbkcw@mail.gmail.com>
Date: Mon, 24 Jun 2024 12:23:28 +0200
From: Íñigo Huguet <ihuguet@...hat.com>
To: jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: igc: return error for link autoneg=off
Sorry, I thought I had done `git pull` on my net-next tree, but I
didn't and the patch doesn't apply due to context differences.
I will send an updated patch in one or two days, including the
requested changes if there are any.
On Mon, Jun 24, 2024 at 11:53 AM Íñigo Huguet <ihuguet@...hat.com> wrote:
>
> The driver doesn't support force mode for the link settings. However, if
> the user request it, it's just ignored and success is returned. Return
> ENOTSUPP instead.
>
> Signed-off-by: Íñigo Huguet <ihuguet@...hat.com>
> ---
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index 93bce729be76..b7b32344d074 100644
> --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> @@ -1832,6 +1832,12 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,
> }
> }
>
> + /* The driver does not support force mode yet */
> + if (cmd->base.autoneg == AUTONEG_DISABLE) {
> + netdev_err(dev, "Force mode currently not supported\n");
> + return -EOPNOTSUPP;
> + }
> +
> while (test_and_set_bit(__IGC_RESETTING, &adapter->state))
> usleep_range(1000, 2000);
>
> @@ -1844,14 +1850,10 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,
> if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full))
> advertising |= ADVERTISE_2500_FULL;
>
> - if (cmd->base.autoneg == AUTONEG_ENABLE) {
> - hw->mac.autoneg = 1;
> - hw->phy.autoneg_advertised = advertising;
> - if (adapter->fc_autoneg)
> - hw->fc.requested_mode = igc_fc_default;
> - } else {
> - netdev_info(dev, "Force mode currently not supported\n");
> - }
> + hw->mac.autoneg = 1;
> + hw->phy.autoneg_advertised = advertising;
> + if (adapter->fc_autoneg)
> + hw->fc.requested_mode = igc_fc_default;
>
> /* MDI-X => 2; MDI => 1; Auto => 3 */
> if (cmd->base.eth_tp_mdix_ctrl) {
> --
> 2.44.0
>
--
Íñigo Huguet
Powered by blists - more mailing lists