Skip to content

Commit

Permalink
net: intel: i40e/igc: Remove setting Autoneg in EEE capabilities
Browse files Browse the repository at this point in the history
Energy Efficient Ethernet should always be negotiated with the link
peer. Don't include SUPPORTED_Autoneg in the results of get_eee() for
supported, advertised or lp_advertised, since it is
assumed. Additionally, ethtool(1) ignores the set bit, and no other
driver sets this.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrew Lunn authored and David S. Miller committed Feb 28, 2024
1 parent 9356b6d commit 01cf893
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
7 changes: 1 addition & 6 deletions drivers/net/ethernet/intel/i40e/i40e_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5664,16 +5664,12 @@ static int i40e_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
if (phy_cfg.eee_capability == 0)
return -EOPNOTSUPP;

edata->supported_u32 = SUPPORTED_Autoneg;
edata->lp_advertised_u32 = edata->supported_u32;

/* Get current configuration */
status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_cfg, NULL);
if (status)
return -EAGAIN;

edata->advertised_u32 = phy_cfg.eee_capability ? SUPPORTED_Autoneg : 0U;
edata->eee_enabled = !!edata->advertised_u32;
edata->eee_enabled = !!phy_cfg.eee_capability;
edata->tx_lpi_enabled = pf->stats.tx_lpi_status;

edata->eee_active = pf->stats.tx_lpi_status && pf->stats.rx_lpi_status;
Expand All @@ -5691,7 +5687,6 @@ static int i40e_is_eee_param_supported(struct net_device *netdev,
u32 value;
const char *name;
} param[] = {
{edata->advertised_u32 & ~SUPPORTED_Autoneg, "advertise"},
{edata->tx_lpi_timer, "tx-timer"},
{edata->tx_lpi_enabled != pf->stats.tx_lpi_status, "tx-lpi"}
};
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/ethernet/intel/igc/igc_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev,
mmd_eee_adv_to_ethtool_adv_t(adapter->eee_advert);

*edata = adapter->eee;
edata->supported_u32 = SUPPORTED_Autoneg;

eeer = rd32(IGC_EEER);

Expand All @@ -1647,9 +1646,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev,

edata->eee_enabled = hw->dev_spec._base.eee_enable;

edata->advertised_u32 = SUPPORTED_Autoneg;
edata->lp_advertised_u32 = SUPPORTED_Autoneg;

/* Report correct negotiated EEE status for devices that
* wrongly report EEE at half-duplex
*/
Expand Down

0 comments on commit 01cf893

Please sign in to comment.