From patchwork Mon Nov 23 09:19:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moshe Shemesh X-Patchwork-Id: 11924691 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D8EBC63777 for ; Mon, 23 Nov 2020 09:20:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 57CC2207FF for ; Mon, 23 Nov 2020 09:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728042AbgKWJUf (ORCPT ); Mon, 23 Nov 2020 04:20:35 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:48105 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727995AbgKWJUf (ORCPT ); Mon, 23 Nov 2020 04:20:35 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with SMTP; 23 Nov 2020 11:20:30 +0200 Received: from vnc1.mtl.labs.mlnx (vnc1.mtl.labs.mlnx [10.7.2.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AN9KUdp000635; Mon, 23 Nov 2020 11:20:30 +0200 Received: from vnc1.mtl.labs.mlnx (localhost [127.0.0.1]) by vnc1.mtl.labs.mlnx (8.14.4/8.14.4) with ESMTP id 0AN9KUG9006506; Mon, 23 Nov 2020 11:20:30 +0200 Received: (from moshe@localhost) by vnc1.mtl.labs.mlnx (8.14.4/8.14.4/Submit) id 0AN9KUj7006505; Mon, 23 Nov 2020 11:20:30 +0200 From: Moshe Shemesh To: "David S. Miller" , Jakub Kicinski , Andrew Lunn , Adrian Pop , Michal Kubecek Cc: netdev@vger.kernel.org, Vladyslav Tarasiuk , Moshe Shemesh Subject: [PATCH net-next v2 1/2] ethtool: Add CMIS 4.0 module type to UAPI Date: Mon, 23 Nov 2020 11:19:57 +0200 Message-Id: <1606123198-6230-2-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1606123198-6230-1-git-send-email-moshe@mellanox.com> References: <1606123198-6230-1-git-send-email-moshe@mellanox.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vladyslav Tarasiuk CMIS 4.0 document describes a universal EEPROM memory layout, which is used for some modules such as DSFP, OSFP and QSFP-DD modules. In order to distinguish them in userspace from existing standards, add corresponding values. CMIS 4.0 EERPOM memory includes mandatory and optional pages, the max read length 768B includes passive and active cables mandatory pages. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh --- include/uapi/linux/ethtool.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 9ca87bc73c44..0ec4c0ea3235 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -1861,9 +1861,12 @@ static inline int ethtool_validate_duplex(__u8 duplex) #define ETH_MODULE_SFF_8636_LEN 256 #define ETH_MODULE_SFF_8436 0x4 #define ETH_MODULE_SFF_8436_LEN 256 +#define ETH_MODULE_CMIS_4 0x5 +#define ETH_MODULE_CMIS_4_LEN 256 #define ETH_MODULE_SFF_8636_MAX_LEN 640 #define ETH_MODULE_SFF_8436_MAX_LEN 640 +#define ETH_MODULE_CMIS_4_MAX_LEN 768 /* Reset flags */ /* The reset() operation must clear the flags for the components which