Blame SOURCES/0013-ethtool-copy.h-sync-with-net-next.patch

4cc9fb
From 3ad39b7b490fc130b47ec248de707d3ae481c9ed Mon Sep 17 00:00:00 2001
4cc9fb
From: Scott Branden <scott.branden@broadcom.com>
4cc9fb
Date: Tue, 12 Dec 2017 12:20:02 -0800
4cc9fb
Subject: [PATCH 13/14] ethtool-copy.h: sync with net-next
4cc9fb
4cc9fb
This covers kernel changes up to:
4cc9fb
4cc9fb
commit 40e44a1e669d078946f46853808a60d29e6f0885
4cc9fb
Author: Scott Branden <scott.branden@broadcom.com>
4cc9fb
Date:   Thu Nov 30 11:35:59 2017 -0800
4cc9fb
4cc9fb
    net: ethtool: add support for reset of AP inside NIC interface.
4cc9fb
4cc9fb
    Add ETH_RESET_AP to reset the application processor(s) inside the NIC
4cc9fb
    interface.
4cc9fb
4cc9fb
    Current ETH_RESET_MGMT supports a management processor inside this NIC.
4cc9fb
    This is typically used for remote NIC management purposes.
4cc9fb
4cc9fb
    Application processors exist inside some SmartNICs to run various
4cc9fb
    applications inside the NIC processor - be it a simple algorithm without
4cc9fb
    an OS to as complex as hosting multiple VMs.
4cc9fb
4cc9fb
    Signed-off-by: Scott Branden <scott.branden@broadcom.com>
4cc9fb
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
4cc9fb
    Signed-off-by: David S. Miller <davem@davemloft.net>
4cc9fb
4cc9fb
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
4cc9fb
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4cc9fb
(cherry picked from commit 83634baa75b5831ed9bfd135f9747b94aacdd842)
4cc9fb
---
4cc9fb
 ethtool-copy.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
4cc9fb
 1 file changed, 61 insertions(+), 5 deletions(-)
4cc9fb
4cc9fb
diff --git a/ethtool-copy.h b/ethtool-copy.h
4cc9fb
index 06fc04c..f4e7bb2 100644
4cc9fb
--- a/ethtool-copy.h
4cc9fb
+++ b/ethtool-copy.h
4cc9fb
@@ -1,3 +1,4 @@
4cc9fb
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
4cc9fb
 /*
4cc9fb
  * ethtool.h: Defines for Linux ethtool.
4cc9fb
  *
4cc9fb
@@ -1236,6 +1237,47 @@ struct ethtool_per_queue_op {
4cc9fb
 	char	data[];
4cc9fb
 };
4cc9fb
 
4cc9fb
+/**
4cc9fb
+ * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters
4cc9fb
+ * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM
4cc9fb
+ * @active_fec: FEC mode which is active on porte
4cc9fb
+ * @fec: Bitmask of supported/configured FEC modes
4cc9fb
+ * @rsvd: Reserved for future extensions. i.e FEC bypass feature.
4cc9fb
+ *
4cc9fb
+ * Drivers should reject a non-zero setting of @autoneg when
4cc9fb
+ * autoneogotiation is disabled (or not supported) for the link.
4cc9fb
+ *
4cc9fb
+ */
4cc9fb
+struct ethtool_fecparam {
4cc9fb
+	__u32   cmd;
4cc9fb
+	/* bitmask of FEC modes */
4cc9fb
+	__u32   active_fec;
4cc9fb
+	__u32   fec;
4cc9fb
+	__u32   reserved;
4cc9fb
+};
4cc9fb
+
4cc9fb
+/**
4cc9fb
+ * enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration
4cc9fb
+ * @ETHTOOL_FEC_NONE: FEC mode configuration is not supported
4cc9fb
+ * @ETHTOOL_FEC_AUTO: Default/Best FEC mode provided by driver
4cc9fb
+ * @ETHTOOL_FEC_OFF: No FEC Mode
4cc9fb
+ * @ETHTOOL_FEC_RS: Reed-Solomon Forward Error Detection mode
4cc9fb
+ * @ETHTOOL_FEC_BASER: Base-R/Reed-Solomon Forward Error Detection mode
4cc9fb
+ */
4cc9fb
+enum ethtool_fec_config_bits {
4cc9fb
+	ETHTOOL_FEC_NONE_BIT,
4cc9fb
+	ETHTOOL_FEC_AUTO_BIT,
4cc9fb
+	ETHTOOL_FEC_OFF_BIT,
4cc9fb
+	ETHTOOL_FEC_RS_BIT,
4cc9fb
+	ETHTOOL_FEC_BASER_BIT,
4cc9fb
+};
4cc9fb
+
4cc9fb
+#define ETHTOOL_FEC_NONE		(1 << ETHTOOL_FEC_NONE_BIT)
4cc9fb
+#define ETHTOOL_FEC_AUTO		(1 << ETHTOOL_FEC_AUTO_BIT)
4cc9fb
+#define ETHTOOL_FEC_OFF			(1 << ETHTOOL_FEC_OFF_BIT)
4cc9fb
+#define ETHTOOL_FEC_RS			(1 << ETHTOOL_FEC_RS_BIT)
4cc9fb
+#define ETHTOOL_FEC_BASER		(1 << ETHTOOL_FEC_BASER_BIT)
4cc9fb
+
4cc9fb
 /* CMDs currently supported */
4cc9fb
 #define ETHTOOL_GSET		0x00000001 /* DEPRECATED, Get settings.
4cc9fb
 					    * Please use ETHTOOL_GLINKSETTINGS
4cc9fb
@@ -1328,6 +1370,8 @@ struct ethtool_per_queue_op {
4cc9fb
 #define ETHTOOL_SLINKSETTINGS	0x0000004d /* Set ethtool_link_settings */
4cc9fb
 #define ETHTOOL_PHY_GTUNABLE	0x0000004e /* Get PHY tunable configuration */
4cc9fb
 #define ETHTOOL_PHY_STUNABLE	0x0000004f /* Set PHY tunable configuration */
4cc9fb
+#define ETHTOOL_GFECPARAM	0x00000050 /* Get FEC settings */
4cc9fb
+#define ETHTOOL_SFECPARAM	0x00000051 /* Set FEC settings */
4cc9fb
 
4cc9fb
 /* compatibility with older code */
4cc9fb
 #define SPARC_ETH_GSET		ETHTOOL_GSET
4cc9fb
@@ -1382,9 +1426,12 @@ enum ethtool_link_mode_bit_indices {
4cc9fb
 	ETHTOOL_LINK_MODE_10000baseLR_Full_BIT	= 44,
4cc9fb
 	ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT	= 45,
4cc9fb
 	ETHTOOL_LINK_MODE_10000baseER_Full_BIT	= 46,
4cc9fb
-	ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47,
4cc9fb
-	ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48,
4cc9fb
+	ETHTOOL_LINK_MODE_2500baseT_Full_BIT	= 47,
4cc9fb
+	ETHTOOL_LINK_MODE_5000baseT_Full_BIT	= 48,
4cc9fb
 
4cc9fb
+	ETHTOOL_LINK_MODE_FEC_NONE_BIT	= 49,
4cc9fb
+	ETHTOOL_LINK_MODE_FEC_RS_BIT	= 50,
4cc9fb
+	ETHTOOL_LINK_MODE_FEC_BASER_BIT	= 51,
4cc9fb
 
4cc9fb
 	/* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
4cc9fb
 	 * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
4cc9fb
@@ -1393,7 +1440,7 @@ enum ethtool_link_mode_bit_indices {
4cc9fb
 	 */
4cc9fb
 
4cc9fb
 	__ETHTOOL_LINK_MODE_LAST
4cc9fb
-	  = ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
4cc9fb
+	  = ETHTOOL_LINK_MODE_FEC_BASER_BIT,
4cc9fb
 };
4cc9fb
 
4cc9fb
 #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)	\
4cc9fb
@@ -1484,13 +1531,17 @@ enum ethtool_link_mode_bit_indices {
4cc9fb
  * it was forced up into this mode or autonegotiated.
4cc9fb
  */
4cc9fb
 
4cc9fb
-/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal. */
4cc9fb
+/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal.
4cc9fb
+ * Update drivers/net/phy/phy.c:phy_speed_to_str() and
4cc9fb
+ * drivers/net/bonding/bond_3ad.c:__get_link_speed() when adding new values.
4cc9fb
+ */
4cc9fb
 #define SPEED_10		10
4cc9fb
 #define SPEED_100		100
4cc9fb
 #define SPEED_1000		1000
4cc9fb
 #define SPEED_2500		2500
4cc9fb
 #define SPEED_5000		5000
4cc9fb
 #define SPEED_10000		10000
4cc9fb
+#define SPEED_14000		14000
4cc9fb
 #define SPEED_20000		20000
4cc9fb
 #define SPEED_25000		25000
4cc9fb
 #define SPEED_40000		40000
4cc9fb
@@ -1633,6 +1684,7 @@ enum ethtool_reset_flags {
4cc9fb
 	ETH_RESET_PHY		= 1 << 6,	/* Transceiver/PHY */
4cc9fb
 	ETH_RESET_RAM		= 1 << 7,	/* RAM shared between
4cc9fb
 						 * multiple components */
4cc9fb
+	ETH_RESET_AP		= 1 << 8,	/* Application processor */
4cc9fb
 
4cc9fb
 	ETH_RESET_DEDICATED	= 0x0000ffff,	/* All components dedicated to
4cc9fb
 						 * this interface */
4cc9fb
@@ -1701,6 +1753,8 @@ enum ethtool_reset_flags {
4cc9fb
  *	%ethtool_link_mode_bit_indices for the link modes, and other
4cc9fb
  *	link features that the link partner advertised through
4cc9fb
  *	autonegotiation; 0 if unknown or not applicable.  Read-only.
4cc9fb
+ * @transceiver: Used to distinguish different possible PHY types,
4cc9fb
+ *	reported consistently by PHYLIB.  Read-only.
4cc9fb
  *
4cc9fb
  * If autonegotiation is disabled, the speed and @duplex represent the
4cc9fb
  * fixed link mode and are writable if the driver supports multiple
4cc9fb
@@ -1752,7 +1806,9 @@ struct ethtool_link_settings {
4cc9fb
 	__u8	eth_tp_mdix;
4cc9fb
 	__u8	eth_tp_mdix_ctrl;
4cc9fb
 	__s8	link_mode_masks_nwords;
4cc9fb
-	__u32	reserved[8];
4cc9fb
+	__u8	transceiver;
4cc9fb
+	__u8	reserved1[3];
4cc9fb
+	__u32	reserved[7];
4cc9fb
 	__u32	link_mode_masks[0];
4cc9fb
 	/* layout of link_mode_masks fields:
4cc9fb
 	 * __u32 map_supported[link_mode_masks_nwords];
4cc9fb
-- 
4cc9fb
1.8.3.1
4cc9fb