Skip to contentSkip to conversation

update net/ixgbe base driver

PATCH In review Yuan Wang 2 participants 13 messages Jan 14, 2025 – Jan 20, 2025 Network drivers

lore
Share & tools
lore

Yuan Wang

author
#0 lore raw

cover update net/ixgbe base driver

Update the ixgbe driver to the lastest version of the snapshot.

Dan Nowlin (1):
net/ixgbe/base: add missing buffer copy

Dawid Zielinski (2):
net/ixgbe/base: add interface for LED control on E610 net/ixgbe/base: Add capability for OROM recovery update

Karol Kolacinski (2):
net/ixgbe/base: Add PTP by PHY feature for E610 net/ixgbe/base: add max_drift_thresh to get_ptp_by_phy

Krzysztof Galazka (1):
net/ixgbe/base: add definition of FW temp event for E610

Lukasz Krakowiak (1):
net/ixgbe/base: fix TSAM checking return value

Piotr Kwapulinski (2):
net/ixgbe/base: disable 2.5/5G speeds from auto-negotiation for E610 net/ixgbe/base: update VF HV subsystem device ID constant

Yuan Wang (1):
net/ixgbe: update base driver README

 drivers/net/ixgbe/base/README            |   2 +-
 drivers/net/ixgbe/base/ixgbe_api.c       |   5 +-
 drivers/net/ixgbe/base/ixgbe_e610.c      | 127 ++++++++++++++++++++---
 drivers/net/ixgbe/base/ixgbe_e610.h      |   5 +
 drivers/net/ixgbe/base/ixgbe_type.h      |   2 +-
 drivers/net/ixgbe/base/ixgbe_type_e610.h |  95 +++++++++++++++++
 6 files changed, 220 insertions(+), 16 deletions(-)
Signature · 1 line
2.43.5
author
#1 lore raw

PATCH 1/10 net/ixgbe/base: fix TSAM checking return value

From: Lukasz Krakowiak <[email protected]>

The return value of ixgbe_get_fw_tsam_mode function may be a large integer that does not match the desired bool type.

Fixes 316637762a5f (net/ixgbe/base: enable E610 device)
---
 drivers/net/ixgbe/base/ixgbe_api.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_api.c +3 -2
index b4920867bc..ffff670dd3 100644
@@ -1168,8 +1168,9 @@ s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
  */
 bool ixgbe_get_fw_tsam_mode(struct ixgbe_hw *hw)
 {
-	return ixgbe_call_func(hw, hw->mac.ops.get_fw_tsam_mode, (hw),
-			       IXGBE_NOT_IMPLEMENTED);
+	if (hw->mac.ops.get_fw_tsam_mode)
+		return hw->mac.ops.get_fw_tsam_mode(hw);
+	return false;
 }
 
 /**
Signature · 1 line
2.43.5
author
#2 lore raw

PATCH 2/10 net/ixgbe/base: add interface for LED control on E610

In reply to Yuan Wang

From: Dawid Zielinski <[email protected]>

Add interface for sending ACI command for setting port identification LED on E610.

---
 drivers/net/ixgbe/base/ixgbe_e610.c      | 29 ++++++++++++++++++++++++
 drivers/net/ixgbe/base/ixgbe_e610.h      |  1 +
 drivers/net/ixgbe/base/ixgbe_type_e610.h | 15 ++++++++++++
 3 files changed, 45 insertions(+)
drivers/net/ixgbe/base/ixgbe_e610.c +29 -0
index b0d55a2411..ee8614d3db 100644
@@ -2004,6 +2004,35 @@ s32 ixgbe_aci_write_i2c(struct ixgbe_hw *hw,
 	return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
 }
 
+/**
+ * ixgbe_aci_set_port_id_led - set LED value for the given port
+ * @hw: pointer to the HW struct
+ * @orig_mode: set LED original mode
+ *
+ * Set LED value for the given port (0x06E9)
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_port_id_led(struct ixgbe_hw *hw, bool orig_mode)
+{
+	struct ixgbe_aci_cmd_set_port_id_led *cmd;
+	struct ixgbe_aci_desc desc;
+
+	cmd = &desc.params.set_port_id_led;
+
+	ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_port_id_led);
+
+	cmd->lport_num = (u8)hw->bus.func;
+	cmd->lport_num_valid = IXGBE_ACI_PORT_ID_PORT_NUM_VALID;
+
+	if (orig_mode)
+		cmd->ident_mode = IXGBE_ACI_PORT_IDENT_LED_ORIG;
+	else
+		cmd->ident_mode = IXGBE_ACI_PORT_IDENT_LED_BLINK;
+
+	return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
 /**
  * ixgbe_aci_set_gpio - set GPIO pin state
  * @hw: pointer to the hw struct
drivers/net/ixgbe/base/ixgbe_e610.h +1 -0
index 4babee821e..716bb86303 100644
@@ -61,6 +61,7 @@ s32 ixgbe_aci_read_i2c(struct ixgbe_hw *hw,
 s32 ixgbe_aci_write_i2c(struct ixgbe_hw *hw,
 			struct ixgbe_aci_cmd_link_topo_addr topo_addr,
 			u16 bus_addr, __le16 addr, u8 params, u8 *data);
+s32 ixgbe_aci_set_port_id_led(struct ixgbe_hw *hw, bool orig_mode);
 s32 ixgbe_aci_set_gpio(struct ixgbe_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
 		       bool value);
 s32 ixgbe_aci_get_gpio(struct ixgbe_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
drivers/net/ixgbe/base/ixgbe_type_e610.h +15 -0
index bad332c6b8..4f09fcf3d5 100644
@@ -477,6 +477,7 @@ enum ixgbe_aci_opc {
 	ixgbe_aci_opc_write_mdio			= 0x06E5,
 	ixgbe_aci_opc_set_gpio_by_func			= 0x06E6,
 	ixgbe_aci_opc_get_gpio_by_func			= 0x06E7,
+	ixgbe_aci_opc_set_port_id_led			= 0x06E9,
 	ixgbe_aci_opc_set_gpio				= 0x06EC,
 	ixgbe_aci_opc_get_gpio				= 0x06ED,
 	ixgbe_aci_opc_sff_eeprom			= 0x06EE,
@@ -1252,6 +1253,19 @@ struct ixgbe_aci_cmd_gpio_by_func {
 
 IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_gpio_by_func);
 
+/* Set Port Identification LED (direct, 0x06E9) */
+struct ixgbe_aci_cmd_set_port_id_led {
+	u8 lport_num;
+	u8 lport_num_valid;
+#define IXGBE_ACI_PORT_ID_PORT_NUM_VALID	BIT(0)
+	u8 ident_mode;
+#define IXGBE_ACI_PORT_IDENT_LED_BLINK		BIT(0)
+#define IXGBE_ACI_PORT_IDENT_LED_ORIG		0
+	u8 rsvd[13];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_port_id_led);
+
 /* Set/Get GPIO (direct, 0x06EC/0x06ED) */
 struct ixgbe_aci_cmd_gpio {
 	__le16 gpio_ctrl_handle;
@@ -1854,6 +1868,7 @@ struct ixgbe_aci_desc {
 		struct ixgbe_aci_cmd_mdio read_write_mdio;
 		struct ixgbe_aci_cmd_mdio read_mdio;
 		struct ixgbe_aci_cmd_mdio write_mdio;
+		struct ixgbe_aci_cmd_set_port_id_led set_port_id_led;
 		struct ixgbe_aci_cmd_gpio_by_func read_write_gpio_by_func;
 		struct ixgbe_aci_cmd_gpio read_write_gpio;
 		struct ixgbe_aci_cmd_sff_eeprom read_write_sff_param;
Signature · 1 line
2.43.5
author
#3 lore raw

PATCH 3/10 net/ixgbe/base: disable 2.5/5G speeds from auto-negotiation for E610

In reply to Yuan Wang

From: Piotr Kwapulinski <[email protected]>

2.5 and 5 Gbps link speeds must be excluded from the auto-negotiation set used during driver initialization due to compatibility issues with certain switches. Those issues do not exist in case of E610 2.5G SKU device (0x57b1).

Fixes c6cb313da739 (net/ixgbe/base: add link management for E610)
---
 drivers/net/ixgbe/base/ixgbe_e610.c | 35 +++++++++++++++++++----------
 1 file changed, 23 insertions(+), 12 deletions(-)
drivers/net/ixgbe/base/ixgbe_e610.c +23 -12
index ee8614d3db..a7d642887f 100644
@@ -4256,16 +4256,6 @@ s32 ixgbe_identify_phy_E610(struct ixgbe_hw *hw)
 	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_1G_SGMII    ||
 	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_1G_USXGMII)
 		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_1GB_FULL;
-	if (pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_2500BASE_T   ||
-	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_2500BASE_X   ||
-	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_2500BASE_KX  ||
-	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_SGMII ||
-	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_USXGMII)
-		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
-	if (pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_5GBASE_T  ||
-	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_5GBASE_KR ||
-	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_5G_USXGMII)
-		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
 	if (pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_10GBASE_T       ||
 	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_10G_SFI_DA      ||
 	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_10GBASE_SR      ||
@@ -4276,10 +4266,31 @@ s32 ixgbe_identify_phy_E610(struct ixgbe_hw *hw)
 	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10G_USXGMII)
 		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_10GB_FULL;
 
-	/* Initialize autoneg speeds */
-	if (!hw->phy.autoneg_advertised)
+	/* 2.5 and 5 Gbps link speeds must be excluded from the
+	 * auto-negotiation set used during driver initialization due to
+	 * compatibility issues with certain switches. Those issues do not
+	 * exist in case of E610 2.5G SKU device (0x57b1).
+	 */
+	if (!hw->phy.autoneg_advertised &&
+	    hw->device_id != IXGBE_DEV_ID_E610_2_5G_T)
 		hw->phy.autoneg_advertised = hw->phy.speeds_supported;
 
+	if (pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_2500BASE_T   ||
+	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_2500BASE_X   ||
+	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_2500BASE_KX  ||
+	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_SGMII ||
+	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_USXGMII)
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+
+	if (!hw->phy.autoneg_advertised &&
+	    hw->device_id == IXGBE_DEV_ID_E610_2_5G_T)
+		hw->phy.autoneg_advertised = hw->phy.speeds_supported;
+
+	if (pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_5GBASE_T  ||
+	    pcaps.phy_type_low  & IXGBE_PHY_TYPE_LOW_5GBASE_KR ||
+	    pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_5G_USXGMII)
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+
 	/* Set PHY ID */
 	memcpy(&hw->phy.id, pcaps.phy_id_oui, sizeof(u32));
 
Signature · 1 line
2.43.5
author
#4 lore raw

PATCH 4/10 net/ixgbe/base: Add PTP by PHY feature for E610

In reply to Yuan Wang

From: Karol Kolacinski <[email protected]>

Add "Set PTP by PHY" (0x0634) ACI command.
Add a new PTP by PHY capability (0x0097).
This command allows configuring PTP timestamping on PHY or MAC.

Add 2 PTP by PHY registers:
PROXY_TX_TS (XGMII_SPARE_REG[0])
PROXY_STS (XGMII_SPARE_REG[1])

---
 drivers/net/ixgbe/base/ixgbe_e610.c      | 56 ++++++++++++++++++++++++
 drivers/net/ixgbe/base/ixgbe_e610.h      |  3 ++
 drivers/net/ixgbe/base/ixgbe_type_e610.h | 52 ++++++++++++++++++++++
 3 files changed, 111 insertions(+)
drivers/net/ixgbe/base/ixgbe_e610.c +56 -0
index a7d642887f..5124b18f59 100644
@@ -747,6 +747,11 @@ ixgbe_parse_common_caps(struct ixgbe_hw *hw, struct ixgbe_hw_common_caps *caps,
 		DEBUGOUT2("%s: next_cluster_id_support = %d\n",
 			  prefix, caps->next_cluster_id_support);
 		break;
+	case IXGBE_ACI_CAPS_PTP_BY_PHY:
+		caps->ptp_by_phy_support = (number == 1);
+		DEBUGOUT2("%s: ptp_by_phy_support = %d\n", prefix,
+			  caps->ptp_by_phy_support);
+		break;
 	default:
 		/* Not one of the recognized common capabilities */
 		found = false;
@@ -1797,6 +1802,57 @@ s32 ixgbe_configure_lse(struct ixgbe_hw *hw, bool activate, u16 mask)
 	return IXGBE_SUCCESS;
 }
 
+/**
+ * ixgbe_set_ptp_by_phy - Set PTP timestamping by PHY
+ * @hw: pointer to the HW struct
+ * @ptp_request: timestamp mode request
+ * @flags: timestamp mode flags
+ *
+ * Set PTP by PHY using ACI command (0x0634).
+ *
+ * Return: 0 on success, negative error code otherwise
+ */
+s32 ixgbe_set_ptp_by_phy(struct ixgbe_hw *hw, u8 ptp_request, u8 flags)
+{
+	struct ixgbe_aci_cmd_set_ptp_by_phy *cmd;
+	struct ixgbe_aci_desc desc;
+
+	ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_ptp_by_phy);
+	cmd = &desc.params.set_ptp_by_phy;
+	cmd->ptp_request = ptp_request;
+	cmd->flags = flags;
+
+	return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_get_ptp_by_phy - Get PTP timestamping by PHY
+ * @hw: pointer to the HW struct
+ * @ptp_config: timestamp mode config
+ * @flags: timestamp mode flags
+ *
+ * Get PTP by PHY using ACI command (0x0635).
+ *
+ * Return: 0 on success, negative error code otherwise
+ */
+s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags)
+{
+	struct ixgbe_aci_cmd_get_ptp_by_phy_resp *resp;
+	struct ixgbe_aci_desc desc;
+	s32 status;
+
+	ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_ptp_by_phy);
+	resp = &desc.params.get_ptp_by_phy_resp;
+
+	status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+	if (!status) {
+		*ptp_config = resp->ptp_config;
+		*flags = resp->flags;
+	}
+
+	return status;
+}
+
 /**
  * ixgbe_aci_get_netlist_node - get a node handle
  * @hw: pointer to the hw struct
drivers/net/ixgbe/base/ixgbe_e610.h +3 -0
index 716bb86303..ccf76e3b9b 100644
@@ -47,6 +47,9 @@ s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse,
 s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask);
 s32 ixgbe_configure_lse(struct ixgbe_hw *hw, bool activate, u16 mask);
 
+s32 ixgbe_set_ptp_by_phy(struct ixgbe_hw *hw, u8 ptp_request, u8 flags);
+s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags);
+
 s32 ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw,
 			       struct ixgbe_aci_cmd_get_link_topo *cmd,
 			       u8 *node_part_number, u16 *node_handle);
drivers/net/ixgbe/base/ixgbe_type_e610.h +52 -0

86 lines not on this page · raw message

Signature · 1 line
2.43.5
author
#5 lore raw

PATCH 5/10 net/ixgbe/base: add definition of FW temp event for E610

In reply to Yuan Wang

From: Krzysztof Galazka <[email protected]>

E610 adapters report overheating using a FW event. Add opcode and event structure to properly handle such events.

---
 drivers/net/ixgbe/base/ixgbe_type_e610.h | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
drivers/net/ixgbe/base/ixgbe_type_e610.h +25 -0
index d0c34c8690..f367ef8a41 100644
@@ -509,6 +509,8 @@ enum ixgbe_aci_opc {
 	ixgbe_aci_opc_done_alt_write			= 0x0904,
 	ixgbe_aci_opc_clear_port_alt_write		= 0x0906,
 
+	ixgbe_aci_opc_temp_tca_event			= 0x0C94,
+
 	/* debug commands */
 	ixgbe_aci_opc_debug_dump_internals		= 0xFF08,
 
@@ -1756,6 +1758,29 @@ struct ixgbe_aci_cmd_get_cgu_info {
 
 IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_cgu_info);
 
+struct ixgbe_aci_cmd_temp_tca_event {
+	u8 event_desc;
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_SHIFT         0
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_NVM           0
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_EVENT_STATE   1
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_ALL           2
+
+#define IXGBE_TEMP_TCA_EVENT_DESC_ALARM_SHIFT        2
+#define IXGBE_TEMP_TCA_EVENT_DESC_WARNING_CLEARED    0
+#define IXGBE_TEMP_TCA_EVENT_DESC_ALARM_CLEARED      1
+#define IXGBE_TEMP_TCA_EVENT_DESC_WARNING_RAISED     2
+#define IXGBE_TEMP_TCA_EVENT_DESC_ALARM_RAISED       3
+
+	u8 reserved;
+	__le16 temperature;
+	__le16 thermal_sensor_max_value;
+	__le16 thermal_sensor_min_value;
+	__le32 addr_high;
+	__le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_temp_tca_event);
+
 /* Debug Dump Internal Data (indirect 0xFF08) */
 struct ixgbe_aci_cmd_debug_dump_internals {
 	__le16 cluster_id; /* Expresses next cluster ID in response */
Signature · 1 line
2.43.5
author
#6 lore raw

PATCH 6/10 net/ixgbe/base: Add capability for OROM recovery update

In reply to Yuan Wang

From: Dawid Zielinski <[email protected]>

Added new capability informing about OROM recovery update.

---
 drivers/net/ixgbe/base/ixgbe_e610.c      | 3 +++
 drivers/net/ixgbe/base/ixgbe_type_e610.h | 3 +++
 2 files changed, 6 insertions(+)
drivers/net/ixgbe/base/ixgbe_e610.c +3 -0
index 5124b18f59..802dfb5062 100644
@@ -741,6 +741,9 @@ ixgbe_parse_common_caps(struct ixgbe_hw *hw, struct ixgbe_hw_common_caps *caps,
 			(phys_id & IXGBE_EXT_TOPO_DEV_IMG_PROG_EN) != 0;
 		break;
 	}
+	case IXGBE_ACI_CAPS_OROM_RECOVERY_UPDATE:
+		caps->orom_recovery_update = (number == 1);
+		break;
 
 	case IXGBE_ACI_CAPS_NEXT_CLUSTER_ID:
 		caps->next_cluster_id_support = (number == 1);
drivers/net/ixgbe/base/ixgbe_type_e610.h +3 -0
index f367ef8a41..e804172252 100644
@@ -700,6 +700,7 @@ struct ixgbe_aci_cmd_list_caps_elem {
 #define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG1		0x0082
 #define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG2		0x0083
 #define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG3		0x0084
+#define IXGBE_ACI_CAPS_OROM_RECOVERY_UPDATE		0x0090
 #define IXGBE_ACI_CAPS_NEXT_CLUSTER_ID			0x0096
 #define IXGBE_ACI_CAPS_PTP_BY_PHY			0x0097
 	u8 major_ver;
@@ -2087,6 +2088,8 @@ struct ixgbe_hw_common_caps {
 #define IXGBE_EXT_TOPO_DEV_IMG_LOAD_EN	BIT(0)
 	bool ext_topo_dev_img_prog_en[IXGBE_EXT_TOPO_DEV_IMG_COUNT];
 #define IXGBE_EXT_TOPO_DEV_IMG_PROG_EN	BIT(1)
+	/* Support for OROM update in Recovery Mode. */
+	bool orom_recovery_update;
 	bool next_cluster_id_support;
 	bool ptp_by_phy_support;
 };
Signature · 1 line
2.43.5
author
#7 lore raw

PATCH 7/10 net/ixgbe/base: add max_drift_thresh to get_ptp_by_phy

In reply to Yuan Wang

From: Karol Kolacinski <[email protected]>

Add max_drift_thresh parameter to ixgbe_get_ptp_by_phy() to allow passing maxDriftThreshold parameter from the response.

---
 drivers/net/ixgbe/base/ixgbe_e610.c | 5 ++++-
 drivers/net/ixgbe/base/ixgbe_e610.h | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_e610.c +4 -1
index 802dfb5062..dc4eafaa5a 100644
@@ -1833,12 +1833,14 @@ s32 ixgbe_set_ptp_by_phy(struct ixgbe_hw *hw, u8 ptp_request, u8 flags)
  * @hw: pointer to the HW struct
  * @ptp_config: timestamp mode config
  * @flags: timestamp mode flags
+ * @max_drift_thresh: maximal PHY clock drift threshold
  *
  * Get PTP by PHY using ACI command (0x0635).
  *
  * Return: 0 on success, negative error code otherwise
  */
-s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags)
+s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags,
+			 u16 *max_drift_thresh)
 {
 	struct ixgbe_aci_cmd_get_ptp_by_phy_resp *resp;
 	struct ixgbe_aci_desc desc;
@@ -1851,6 +1853,7 @@ s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags)
 	if (!status) {
 		*ptp_config = resp->ptp_config;
 		*flags = resp->flags;
+		*max_drift_thresh = IXGBE_LE16_TO_CPU(resp->maxDriftThreshold);
 	}
 
 	return status;
drivers/net/ixgbe/base/ixgbe_e610.h +2 -1
index ccf76e3b9b..f60268cf91 100644
@@ -48,7 +48,8 @@ s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask);
 s32 ixgbe_configure_lse(struct ixgbe_hw *hw, bool activate, u16 mask);
 
 s32 ixgbe_set_ptp_by_phy(struct ixgbe_hw *hw, u8 ptp_request, u8 flags);
-s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags);
+s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags,
+			 u16 *max_drift_thresh);
 
 s32 ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw,
 			       struct ixgbe_aci_cmd_get_link_topo *cmd,
Signature · 1 line
2.43.5
author
#8 lore raw

PATCH 8/10 net/ixgbe/base: update VF HV subsystem device ID constant

In reply to Yuan Wang

From: Piotr Kwapulinski <[email protected]>

Current value of IXGBE_SUBDEV_ID_E610_VF_HV (0x0001) causes the conflict with real e610 subsystem device ID. This causes the TX hung of driver running in VM. Update this value to 0x00FF to resolve conflict.

Fixes 659e36767e77 (net/ixgbe/base: add E610 VF HV macro)
---
 drivers/net/ixgbe/base/ixgbe_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_type.h +1 -1
index cc49eace91..99ae823119 100644
@@ -131,7 +131,7 @@
 #define IXGBE_DEV_ID_E610_2_5G_T		0x57B1
 #define IXGBE_DEV_ID_E610_SGMII			0x57B2
 #define IXGBE_DEV_ID_E610_VF			0x57AD
-#define IXGBE_SUBDEV_ID_E610_VF_HV		0x0001
+#define IXGBE_SUBDEV_ID_E610_VF_HV		0x00FF
 
 #define IXGBE_CAT(r, m) IXGBE_##r##m
 
Signature · 1 line
2.43.5
author
#9 lore raw

PATCH 9/10 net/ixgbe/base: add missing buffer copy

In reply to Yuan Wang

From: Dan Nowlin <[email protected]>

Add missing buffer copy in ixgbe_aci_send_cmd_sc().

In ixgbe_aci_send_cmd_sc() there is code to retry aq commands for certain commands. To achieve this the function makes a copy of the original ixgbe_aci_desc structure and allocates memory to store an original copy of the command buffer. This allows the original structure and buffer to be restored before attempting the command again. However, the function didn't perform the actual copy of the original command buffer into the copy buffer.

---
 drivers/net/ixgbe/base/ixgbe_e610.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ixgbe/base/ixgbe_e610.c +1 -0
index dc4eafaa5a..5474c3012a 100644
@@ -282,6 +282,7 @@ s32 ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,
 			buf_cpy = (u8 *)ixgbe_malloc(hw, buf_size);
 			if (!buf_cpy)
 				return IXGBE_ERR_OUT_OF_MEM;
+			memcpy(buf_cpy, buf, buf_size);
 		}
 		memcpy(&desc_cpy, desc, sizeof(desc_cpy));
 	}
Signature · 1 line
2.43.5
#10 lore raw

Re: [PATCH 09/10] net/ixgbe/base: add missing buffer copy

Quoted 12 lines · Yuan Wang

From: Dan Nowlin <[email protected]>

Add missing buffer copy in ixgbe_aci_send_cmd_sc().

In ixgbe_aci_send_cmd_sc() there is code to retry aq commands for certain commands. To achieve this the function makes a copy of the original ixgbe_aci_desc structure and allocates memory to store an original copy of the command buffer. This allows the original structure and buffer to be restored before attempting the command again. However, the function didn't perform the actual copy of the original command buffer into the copy buffer.

Quoted 6 lines
---
 drivers/net/ixgbe/base/ixgbe_e610.c | 1 +
 1 file changed, 1 insertion(+)
Fixes 25b48e569f2f ("net/ixgbe/base: add E610 Admin Command Interface")
author
#11 lore raw

PATCH 10/10 net/ixgbe: update base driver README

In reply to Yuan Wang

Update README with the date of when the lastest snapshot was generated.

---
 drivers/net/ixgbe/base/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/README +1 -1
index a6429fef19..8693c4ebc1 100644
@@ -6,7 +6,7 @@ Intel® IXGBE driver
 ===================
 
 This directory contains source code of ixgbe base driver generated on
-2024-08-38 released by the team which develops
+2024-12-20 released by the team which develops
 basic drivers for any ixgbe NIC. The sub-directory of base/
 contains the original source package.
 This driver is valid for the product(s) listed below
Signature · 1 line
2.43.5
#12 lore raw
In reply to Yuan Wang
Quoted 26 lines · Yuan Wang

Update the ixgbe driver to the lastest version of the snapshot.

Dan Nowlin (1):
net/ixgbe/base: add missing buffer copy

Dawid Zielinski (2):
net/ixgbe/base: add interface for LED control on E610 net/ixgbe/base: Add capability for OROM recovery update

Karol Kolacinski (2):
net/ixgbe/base: Add PTP by PHY feature for E610 net/ixgbe/base: add max_drift_thresh to get_ptp_by_phy

Krzysztof Galazka (1):
net/ixgbe/base: add definition of FW temp event for E610

Lukasz Krakowiak (1):
net/ixgbe/base: fix TSAM checking return value

Piotr Kwapulinski (2):
net/ixgbe/base: disable 2.5/5G speeds from auto-negotiation for E610 net/ixgbe/base: update VF HV subsystem device ID constant

Yuan Wang (1):
net/ixgbe: update base driver README

Quoted 8 lines
 drivers/net/ixgbe/base/README            |   2 +-
 drivers/net/ixgbe/base/ixgbe_api.c       |   5 +-
 drivers/net/ixgbe/base/ixgbe_e610.c      | 127 ++++++++++++++++++++---
 drivers/net/ixgbe/base/ixgbe_e610.h      |   5 +
 drivers/net/ixgbe/base/ixgbe_type.h      |   2 +-
 drivers/net/ixgbe/base/ixgbe_type_e610.h |  95 +++++++++++++++++
 6 files changed, 220 insertions(+), 16 deletions(-)

Series applied to dpdk-next-net-intel.
Thanks,
/Bruce