[05/10] net/ixgbe/base: add definition of FW temp event for E610

Message ID 20250114101024.159941-6-yuanx.wang@intel.com (mailing list archive)
State Accepted
Delegated to: Bruce Richardson
Headers
Series update net/ixgbe base driver |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Yuan Wang Jan. 14, 2025, 10:10 a.m. UTC
From: Krzysztof Galazka <krzysztof.galazka@intel.com>

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

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_type_e610.h | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
  

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_type_e610.h b/drivers/net/ixgbe/base/ixgbe_type_e610.h
index d0c34c8690..f367ef8a41 100644
--- a/drivers/net/ixgbe/base/ixgbe_type_e610.h
+++ b/drivers/net/ixgbe/base/ixgbe_type_e610.h
@@ -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 */