From patchwork Wed Aug 28 15:25:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13781490 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BC7D17837D; Wed, 28 Aug 2024 15:25:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724858722; cv=none; b=r8s5RUiCji3QZfHpzqY94PIWLVF6BWjAzxJROhmipMWeyc8OSONbxXd2Lrx235wkKL7TgfKCYdhkpq0UigAWhBrUisnvOEr+UoIrAGX4rnrMlKwAIs73SoyPJJCeUTWIlXIiav/w1A47DcrJauyd7/0eW43RTpu3ifKuR6K/EZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724858722; c=relaxed/simple; bh=q1ciOsgBe6nOMNe/QcqITeOp8zgtWo3rcRrsQqCQhhU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DGwT5lb4zHIBqJ5m549TM0SYGe44N4QqLj5PDmo6tmLtowpKxmElikclVT1fTiARDN4QpO9RdJvFkzGp+LShpg/Yg0+yvv/+2ptJ+t/AZieHff4jAdIWkErIjUm3+6pp1uR2cd8WphAdERuitOHzX83TiT47s4nlZ+jlbf3Jcv8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=SNMqTrnU; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SNMqTrnU" Received: by mail.gandi.net (Postfix) with ESMTPSA id 6F3A9FF802; Wed, 28 Aug 2024 15:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1724858718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OlaXxMxBrgw2vCrTEGA1iAshOuNVggk3yeynTDW4nVw=; b=SNMqTrnUDFUeV2U9mXx7F85UPOHEbcPINNobeuGQcsQU6jlSIBEnsBnNtfE9PaA1YMWn5Z Q89Ami3JbZTDNyGt9Xndo3oM3VZeNlJxYryG2KXNBpuqWog1t7YiCoTMiSRfCuHi6BtU0g PYwlTugGJ2AVrs3IG6bTlS2s4jvr/xEsny8ibW7pkuZUfGRic1QWHjnJXIJ/xTjLQ7oKQv xYIuiljuVX9mYxqb0EgoiKQcSfWpn0OA/FZ81yyHWDRK5zuxB/whFPwemVE1IZiinU3+eU KoInmSSMV6m4egYFZFuPpnBc61vUkjpv43nWiJrZH02aJsIYgH/EoInkWDYJ5w== From: Maxime Chevallier To: davem@davemloft.net, Michal Kubecek Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?utf-8?q?K=C3=B6ry_Maincent?= , Jonathan Corbet , =?utf-8?q?Marek_Beh=C3=BAn?= , Piergiorgio Beruto , Oleksij Rempel , =?utf-8?q?Nicol=C3=B2_Veronese?= , Simon Horman Subject: [PATCH ethtool-next v2 1/3] update UAPI header copies Date: Wed, 28 Aug 2024 17:25:08 +0200 Message-ID: <20240828152511.194453-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240828152511.194453-1-maxime.chevallier@bootlin.com> References: <20240828152511.194453-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Update to kernel commit 7d3aed652d09. Signed-off-by: Maxime Chevallier --- uapi/linux/ethtool.h | 16 ++++++++++++++++ uapi/linux/ethtool_netlink.h | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h index fef07da..7022fcc 100644 --- a/uapi/linux/ethtool.h +++ b/uapi/linux/ethtool.h @@ -2531,4 +2531,20 @@ struct ethtool_link_settings { * __u32 map_lp_advertising[link_mode_masks_nwords]; */ }; + +/** + * enum phy_upstream - Represents the upstream component a given PHY device + * is connected to, as in what is on the other end of the MII bus. Most PHYs + * will be attached to an Ethernet MAC controller, but in some cases, there's + * an intermediate PHY used as a media-converter, which will driver another + * MII interface as its output. + * @PHY_UPSTREAM_MAC: Upstream component is a MAC (a switch port, + * or ethernet controller) + * @PHY_UPSTREAM_PHY: Upstream component is a PHY (likely a media converter) + */ +enum phy_upstream { + PHY_UPSTREAM_MAC, + PHY_UPSTREAM_PHY, +}; + #endif /* _LINUX_ETHTOOL_H */ diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h index dfc25a0..f865c7c 100644 --- a/uapi/linux/ethtool_netlink.h +++ b/uapi/linux/ethtool_netlink.h @@ -58,6 +58,7 @@ enum { ETHTOOL_MSG_MM_GET, ETHTOOL_MSG_MM_SET, ETHTOOL_MSG_MODULE_FW_FLASH_ACT, + ETHTOOL_MSG_PHY_GET, /* add new constants above here */ __ETHTOOL_MSG_USER_CNT, @@ -111,6 +112,8 @@ enum { ETHTOOL_MSG_MM_GET_REPLY, ETHTOOL_MSG_MM_NTF, ETHTOOL_MSG_MODULE_FW_FLASH_NTF, + ETHTOOL_MSG_PHY_GET_REPLY, + ETHTOOL_MSG_PHY_NTF, /* add new constants above here */ __ETHTOOL_MSG_KERNEL_CNT, @@ -134,6 +137,7 @@ enum { ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */ ETHTOOL_A_HEADER_DEV_NAME, /* string */ ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */ + ETHTOOL_A_HEADER_PHY_INDEX, /* u32 */ /* add new constants above here */ __ETHTOOL_A_HEADER_CNT, @@ -556,6 +560,10 @@ enum { * a regular 100 Ohm cable and a part with the abnormal impedance value */ ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH, + /* TDR not possible due to high noise level */ + ETHTOOL_A_CABLE_RESULT_CODE_NOISE, + /* TDR resolution not possible / out of distance */ + ETHTOOL_A_CABLE_RESULT_CODE_RESOLUTION_NOT_POSSIBLE, }; enum { @@ -965,6 +973,7 @@ enum { ETHTOOL_A_RSS_INDIR, /* binary */ ETHTOOL_A_RSS_HKEY, /* binary */ ETHTOOL_A_RSS_INPUT_XFRM, /* u32 */ + ETHTOOL_A_RSS_START_CONTEXT, /* u32 */ __ETHTOOL_A_RSS_CNT, ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1), @@ -1049,6 +1058,22 @@ enum { ETHTOOL_A_MODULE_FW_FLASH_MAX = (__ETHTOOL_A_MODULE_FW_FLASH_CNT - 1) }; +enum { + ETHTOOL_A_PHY_UNSPEC, + ETHTOOL_A_PHY_HEADER, /* nest - _A_HEADER_* */ + ETHTOOL_A_PHY_INDEX, /* u32 */ + ETHTOOL_A_PHY_DRVNAME, /* string */ + ETHTOOL_A_PHY_NAME, /* string */ + ETHTOOL_A_PHY_UPSTREAM_TYPE, /* u32 */ + ETHTOOL_A_PHY_UPSTREAM_INDEX, /* u32 */ + ETHTOOL_A_PHY_UPSTREAM_SFP_NAME, /* string */ + ETHTOOL_A_PHY_DOWNSTREAM_SFP_NAME, /* string */ + + /* add new constants above here */ + __ETHTOOL_A_PHY_CNT, + ETHTOOL_A_PHY_MAX = (__ETHTOOL_A_PHY_CNT - 1) +}; + /* generic netlink info */ #define ETHTOOL_GENL_NAME "ethtool" #define ETHTOOL_GENL_VERSION 1