From: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: anthony.l.nguyen@intel.com, netdev@vger.kernel.org,
Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: [PATCH iwl-next v2 2/6] ixgbe: E610: use new version of 0x601 ACI command buffer
Date: Tue, 20 Jan 2026 14:44:30 +0100 [thread overview]
Message-ID: <20260120134434.1931602-3-jedrzej.jagielski@intel.com> (raw)
In-Reply-To: <20260120134434.1931602-1-jedrzej.jagielski@intel.com>
Since FW version 1.40, buffer size of the 0x601 cmd has been increased
by 2B - from 24 to 26B. Buffer has been extended with new field
which can be used to configure EEE entry delay.
Pre-1.40 FW versions still expect 24B buffer and throws error when
receipts 26B buffer. To keep compatibility, check whether EEE
device capability flag is set and basing on it use appropriate
size of the command buffer.
Additionally place Set PHY Config capabilities defines out of
structs definitions.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 17 ++++++++++++++++-
.../net/ethernet/intel/ixgbe/ixgbe_type_e610.h | 15 +++++++++------
2 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
index 9ae1e3620ee1..431c932f036b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
@@ -1096,11 +1096,16 @@ int ixgbe_aci_set_phy_cfg(struct ixgbe_hw *hw,
{
struct ixgbe_aci_cmd_set_phy_cfg *cmd;
struct libie_aq_desc desc;
+ bool use_buff_eee_field;
+ u16 buf_size;
int err;
if (!cfg)
return -EINVAL;
+ /* If FW supports EEE, we have to use buffer with EEE field. */
+ use_buff_eee_field = hw->dev_caps.common_cap.eee_support;
+
cmd = libie_aq_raw(&desc);
/* Ensure that only valid bits of cfg->caps can be turned on. */
cfg->caps &= IXGBE_ACI_PHY_ENA_VALID_MASK;
@@ -1109,7 +1114,17 @@ int ixgbe_aci_set_phy_cfg(struct ixgbe_hw *hw,
cmd->lport_num = hw->bus.func;
desc.flags |= cpu_to_le16(LIBIE_AQ_FLAG_RD);
- err = ixgbe_aci_send_cmd(hw, &desc, cfg, sizeof(*cfg));
+ if (use_buff_eee_field)
+ buf_size = sizeof(*cfg);
+ else
+ /* Buffer w/o eee_entry_delay field is 2B smaller. */
+ buf_size = sizeof(*cfg) - sizeof(u16);
+
+ err = ixgbe_aci_send_cmd(hw, &desc, cfg, buf_size);
+
+ /* 1.40 config format is compatible with pre-1.40, just extends
+ * it at the end.
+ */
if (!err)
hw->phy.curr_user_phy_cfg = *cfg;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
index 11dc7fc71b71..db62281c9413 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
@@ -382,6 +382,15 @@ struct ixgbe_aci_cmd_set_phy_cfg_data {
__le64 phy_type_low; /* Use values from IXGBE_PHY_TYPE_LOW_* */
__le64 phy_type_high; /* Use values from IXGBE_PHY_TYPE_HIGH_* */
u8 caps;
+ u8 low_power_ctrl_an;
+ __le16 eee_cap; /* Value from ixgbe_aci_get_phy_caps */
+ __le16 eeer_value; /* Use defines from ixgbe_aci_get_phy_caps */
+ u8 link_fec_opt; /* Use defines from ixgbe_aci_get_phy_caps */
+ u8 module_compliance_enforcement;
+ __le16 eee_entry_delay;
+} __packed;
+
+/* Set PHY config capabilities (@caps) defines */
#define IXGBE_ACI_PHY_ENA_VALID_MASK 0xef
#define IXGBE_ACI_PHY_ENA_TX_PAUSE_ABILITY BIT(0)
#define IXGBE_ACI_PHY_ENA_RX_PAUSE_ABILITY BIT(1)
@@ -390,12 +399,6 @@ struct ixgbe_aci_cmd_set_phy_cfg_data {
#define IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT BIT(5)
#define IXGBE_ACI_PHY_ENA_LESM BIT(6)
#define IXGBE_ACI_PHY_ENA_AUTO_FEC BIT(7)
- u8 low_power_ctrl_an;
- __le16 eee_cap; /* Value from ixgbe_aci_get_phy_caps */
- __le16 eeer_value; /* Use defines from ixgbe_aci_get_phy_caps */
- u8 link_fec_opt; /* Use defines from ixgbe_aci_get_phy_caps */
- u8 module_compliance_enforcement;
-};
/* Restart AN command data structure (direct 0x0605)
* Also used for response, with only the lport_num field present.
--
2.31.1
next prev parent reply other threads:[~2026-01-20 14:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 13:44 [PATCH iwl-next v2 0/6] ixgbe: enable EEE for E610 devices Jedrzej Jagielski
2026-01-20 13:44 ` [PATCH iwl-next v2 1/6] ixgbe: E610: add discovering EEE capability Jedrzej Jagielski
2026-03-03 16:46 ` [Intel-wired-lan] " Rinitha, SX
2026-04-30 23:20 ` Jacob Keller
2026-01-20 13:44 ` Jedrzej Jagielski [this message]
2026-03-03 16:46 ` [Intel-wired-lan] [PATCH iwl-next v2 2/6] ixgbe: E610: use new version of 0x601 ACI command buffer Rinitha, SX
2026-01-20 13:44 ` [PATCH iwl-next v2 3/6] ixgbe: E610: update EEE supported speeds Jedrzej Jagielski
2026-03-03 16:46 ` [Intel-wired-lan] " Rinitha, SX
2026-01-20 13:44 ` [PATCH iwl-next v2 4/6] ixgbe: E610: update ACI command structs with EEE fields Jedrzej Jagielski
2026-03-03 16:46 ` [Intel-wired-lan] " Rinitha, SX
2026-01-20 13:44 ` [PATCH iwl-next v2 5/6] ixgbe: move EEE config validation out of ixgbe_set_eee() Jedrzej Jagielski
2026-03-03 16:46 ` [Intel-wired-lan] " Rinitha, SX
2026-01-20 13:44 ` [PATCH iwl-next v2 6/6] ixgbe: E610: add EEE support Jedrzej Jagielski
2026-03-03 16:47 ` [Intel-wired-lan] " Rinitha, SX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260120134434.1931602-3-jedrzej.jagielski@intel.com \
--to=jedrzej.jagielski@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox