[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8ca1bd29-a736-40bf-8d53-39c9577228c0@lunn.ch>
Date: Mon, 12 Jan 2026 16:56:22 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, anthony.l.nguyen@...el.com,
netdev@...r.kernel.org,
Aleksandr Loktionov <aleksandr.loktionov@...el.com>
Subject: Re: [PATCH iwl-next v1 7/7] ixgbe: E610: add EEE support
> +/**
> + * ixgbe_setup_eee_e610 - Enable/disable EEE support
> + * @hw: pointer to the HW structure
> + * @enable_eee: boolean flag to enable EEE
> + *
> + * Enable/disable EEE based on @enable_eee.
> + *
> + * Return: the exit code of the operation.
> + */
> +int ixgbe_setup_eee_e610(struct ixgbe_hw *hw, bool enable_eee)
> +{
> + struct ixgbe_aci_cmd_get_phy_caps_data phy_caps = {};
> + struct ixgbe_aci_cmd_set_phy_cfg_data phy_cfg = {};
> + u16 eee_cap = 0;
> + int err;
> +
> + err = ixgbe_aci_get_phy_caps(hw, false,
> + IXGBE_ACI_REPORT_ACTIVE_CFG, &phy_caps);
> + if (err)
> + return err;
> +
> + ixgbe_copy_phy_caps_to_cfg(&phy_caps, &phy_cfg);
> + phy_cfg.caps |= (IXGBE_ACI_PHY_ENA_LINK |
> + IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT);
> +
> + if (enable_eee) {
> + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_100_FULL)
> + eee_cap |= IXGBE_ACI_PHY_EEE_EN_100BASE_TX;
> + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_1GB_FULL)
> + eee_cap |= IXGBE_ACI_PHY_EEE_EN_1000BASE_T;
You say in a few different places that EEE is not supported for <=
1G. So why have this? It should never happen.
> +bool ixgbe_is_eee_link_speed_supported_e610(struct ixgbe_adapter *adapter,
> + bool print_msg)
> +{
> + switch (adapter->link_speed) {
> + case IXGBE_LINK_SPEED_10GB_FULL:
> + case IXGBE_LINK_SPEED_2_5GB_FULL:
> + case IXGBE_LINK_SPEED_5GB_FULL:
> + return true;
> + case IXGBE_LINK_SPEED_10_FULL:
I don't think IEEE defines EEE for 10Mbs. So this should be in your
default case, where you handle 10_HALF, 100_HALF, 1G_HALF which also
are not defined in 802.3.
> + case IXGBE_LINK_SPEED_100_FULL:
> + case IXGBE_LINK_SPEED_1GB_FULL:
> + if (print_msg)
> + e_dev_info("Energy Efficient Ethernet (EEE) feature is not supported on link speeds equal to or below 1Gbps. EEE is supported on speeds above 1Gbps.\n");
> + fallthrough;
> + default:
> + return false;
> + }
> +}
Andrew
Powered by blists - more mailing lists