Blame SOURCES/0020-uapi-linux-update-kernel-UAPI-header-files.patch

3259a4
From 8fa6c3a1bc2536816e961a4ef865c67218683bf2 Mon Sep 17 00:00:00 2001
3259a4
From: Amit Cohen <amitc@mellanox.com>
3259a4
Date: Thu, 2 Jul 2020 16:11:09 +0300
3259a4
Subject: [PATCH 20/26] uapi: linux: update kernel UAPI header files
3259a4
3259a4
Add copies of kernel UAPI header files needed for link extended state:
3259a4
	uapi/linux/ethtool.h
3259a4
	uapi/linux/ethtool_netlink.h
3259a4
3259a4
The copies are taken from net-next tree,
3259a4
commit ecc31c60240b ("ethtool: Add link extended state")
3259a4
3259a4
Signed-off-by: Amit Cohen <amitc@mellanox.com>
3259a4
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
3259a4
(cherry picked from commit dc46dd315071190b880dba9b48dd4521cf7c133e)
3259a4
---
3259a4
 uapi/linux/ethtool.h         | 70 ++++++++++++++++++++++++++++++++++++
3259a4
 uapi/linux/ethtool_netlink.h |  2 ++
3259a4
 2 files changed, 72 insertions(+)
3259a4
3259a4
diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h
3259a4
index 355e718a99fd..847ccd0b1fce 100644
3259a4
--- a/uapi/linux/ethtool.h
3259a4
+++ b/uapi/linux/ethtool.h
3259a4
@@ -577,6 +577,76 @@ struct ethtool_pauseparam {
3259a4
 	__u32	tx_pause;
3259a4
 };
3259a4
 
3259a4
+/**
3259a4
+ * enum ethtool_link_ext_state - link extended state
3259a4
+ */
3259a4
+enum ethtool_link_ext_state {
3259a4
+	ETHTOOL_LINK_EXT_STATE_AUTONEG,
3259a4
+	ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE,
3259a4
+	ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH,
3259a4
+	ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY,
3259a4
+	ETHTOOL_LINK_EXT_STATE_NO_CABLE,
3259a4
+	ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE,
3259a4
+	ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE,
3259a4
+	ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE,
3259a4
+	ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
3259a4
+	ETHTOOL_LINK_EXT_STATE_OVERHEAT,
3259a4
+};
3259a4
+
3259a4
+/**
3259a4
+ * enum ethtool_link_ext_substate_autoneg - more information in addition to
3259a4
+ * ETHTOOL_LINK_EXT_STATE_AUTONEG.
3259a4
+ */
3259a4
+enum ethtool_link_ext_substate_autoneg {
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD,
3259a4
+};
3259a4
+
3259a4
+/**
3259a4
+ * enum ethtool_link_ext_substate_link_training - more information in addition to
3259a4
+ * ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE.
3259a4
+ */
3259a4
+enum ethtool_link_ext_substate_link_training {
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT,
3259a4
+};
3259a4
+
3259a4
+/**
3259a4
+ * enum ethtool_link_ext_substate_logical_mismatch - more information in addition
3259a4
+ * to ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH.
3259a4
+ */
3259a4
+enum ethtool_link_ext_substate_link_logical_mismatch {
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED,
3259a4
+};
3259a4
+
3259a4
+/**
3259a4
+ * enum ethtool_link_ext_substate_bad_signal_integrity - more information in
3259a4
+ * addition to ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY.
3259a4
+ */
3259a4
+enum ethtool_link_ext_substate_bad_signal_integrity {
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,
3259a4
+};
3259a4
+
3259a4
+/**
3259a4
+ * enum ethtool_link_ext_substate_cable_issue - more information in
3259a4
+ * addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE.
3259a4
+ */
3259a4
+enum ethtool_link_ext_substate_cable_issue {
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1,
3259a4
+	ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
3259a4
+};
3259a4
+
3259a4
 #define ETH_GSTRING_LEN		32
3259a4
 
3259a4
 /**
3259a4
diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h
3259a4
index c1b4d67d35d1..cebdb52e6a05 100644
3259a4
--- a/uapi/linux/ethtool_netlink.h
3259a4
+++ b/uapi/linux/ethtool_netlink.h
3259a4
@@ -237,6 +237,8 @@ enum {
3259a4
 	ETHTOOL_A_LINKSTATE_LINK,		/* u8 */
3259a4
 	ETHTOOL_A_LINKSTATE_SQI,		/* u32 */
3259a4
 	ETHTOOL_A_LINKSTATE_SQI_MAX,		/* u32 */
3259a4
+	ETHTOOL_A_LINKSTATE_EXT_STATE,		/* u8 */
3259a4
+	ETHTOOL_A_LINKSTATE_EXT_SUBSTATE,	/* u8 */
3259a4
 
3259a4
 	/* add new constants above here */
3259a4
 	__ETHTOOL_A_LINKSTATE_CNT,
3259a4
-- 
3259a4
2.26.2
3259a4