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

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