Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1598404rdb; Mon, 2 Oct 2023 15:00:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlxIxOrB/ZpKfNOjqYZ3xS7kTvoCty8jSE0EZfnbDieRwV1cIlgL1khz702oW5NcoiiowS X-Received: by 2002:a05:6a20:1602:b0:15d:b407:b0a0 with SMTP id l2-20020a056a20160200b0015db407b0a0mr1316671pzj.26.1696284026857; Mon, 02 Oct 2023 15:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696284026; cv=none; d=google.com; s=arc-20160816; b=xJX0DtIAi92DF6OefAYPqt/1Dixqf37PyWeQTwJorNRgQogJ/wBLBbTooJJm/nb2eQ 9tQoBkigH0a68aHyO2d74HHVs+rKHsGfwq8nJjxnQc4zSHVHksDfuLqZK1BOLo3oIveg kEH2TEvoUXrqNYUxR5pjiXFWkv633jdeOVhw3+XD3G0TGv5C2GRj90HE3vrMBPu+fJxj 6dipHjWQ0bg3AwaR5C5IFCqu6op/kP0MSkbpJUU5/prrzAdmTaH1n5DZfd4aG9ySDxIc G+apB2R2107GWx4Hu/1oONlAeIr/iG3I35Q5UVyiP7CV9GgNFdrcyphAxWTJBe9K6nlf 08Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ds6VTt0w8PY6LpzSqGG11xF1/RVNxL0JohTRt+pMTII=; fh=pbZyqEDyWGy/KRFIOtnMVxtI61y5wDJ5XWPPA5sL6cg=; b=GP1n/SYvlN/oiCxIx38V8gniHUJmmDBHfjhz5wiOwuIi6pClZs7FMLUwXRu5fZzyoP RFRZ/3v4awA0tY760ZsDpa/u4riQG5EEogyqK55+mS6RvSE1vMAhDa4rkodhCqSE1pIK 0EGTqXCFOTWc6USDd+R+n3T/CTx9G85MfpQD8mdEHpX9+YwcmyJu0+E0IFA4kzVZAzHV FVz96NfDoKcg8NoMaoDqtTRLuPS9VcJYBKR6ZI+BpSKEzHqDcNe2E/plyuf13jkpDxqD KdEUnfjbxGZf5AbKNNnE2llT/32ypmRa0VQalGsEFK3Q12ZILVNLM67tLMBAaT2VS5Sg BaEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Y/S8TP0y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c4-20020a056a00248400b00690cff4a2b6si29984856pfv.112.2023.10.02.15.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Y/S8TP0y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9260E8082DF0; Mon, 2 Oct 2023 12:20:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238588AbjJBTUG (ORCPT + 99 others); Mon, 2 Oct 2023 15:20:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbjJBTUF (ORCPT ); Mon, 2 Oct 2023 15:20:05 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64976B0; Mon, 2 Oct 2023 12:20:02 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-4195fddd6d7so694721cf.0; Mon, 02 Oct 2023 12:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696274401; x=1696879201; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ds6VTt0w8PY6LpzSqGG11xF1/RVNxL0JohTRt+pMTII=; b=Y/S8TP0yFclFtprmwqcasgOyr+2egpR8ch8IvWTyFtFcDOfsFYQ9JCoWABuJG+QQL4 UZneCKLoFyf0ORS2hIayCCNFjMUdYRj8tGFzb4v1SOv1aj+2RpxN4fMKro/LpeFkMxkG GlwNUAdb9gAIPyOENjqvOly/7Sq/+QNrVo0LsZsbZckcar5MKWC9afZqhpdhXdeBDugc DrDQ9W9hW/V511LYgHWTB/NdtGHHvgh3O87JakkZtfTVK5OD5jKEt0/zWSspFXQFX0Tw zt29YItP1sl6OUCZGqYE9gD7+olDEwTm7LTt7rZOyGdVlHWxlhXnsbd5r3ZhDL9Y6kAi FXHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696274401; x=1696879201; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ds6VTt0w8PY6LpzSqGG11xF1/RVNxL0JohTRt+pMTII=; b=evsoAlUTQtPz+QhtwIXBf8/jq60Q+6EbGCCwo1Uuem5EInUEUIj3UwKHyMVZobagt1 r16Mts45jaw1rV++QLpMGkqVWWa+dFSsTeNWMwjEHlUeSm7s7WPNkbH3rDOxPm2JC2dl s9I2kjH1DV+H6Xne6dUOMuCuvRtZSkd9/ZwUgv/Z4lCeKIyUszm8GlGS8FRjqXbgUovV gI75UT9iOUJcV2nuTX2NQslr3Kg4G4bOeZdk0Qf22xyAClimtt4VKqDwmikDLSLIwxFs MKkMs09R9qIuTIHJ95C2zSabOmYYIlDom3B9+6iXTUF4K2JNWyZA8+IZigvq8z3QHzLg TP/A== X-Gm-Message-State: AOJu0Yx/wrqIJe8KKmc7kXhbAenpz8XVfNDMVxKc82Q0FKbe+eA3g2WB 4RTol+RBwjadgwWIDtoGUY8= X-Received: by 2002:ac8:588f:0:b0:408:392e:2aa5 with SMTP id t15-20020ac8588f000000b00408392e2aa5mr546193qta.20.1696274401317; Mon, 02 Oct 2023 12:20:01 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id b10-20020ac86bca000000b004198ac8be74sm1728335qtt.65.2023.10.02.12.19.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 12:20:00 -0700 (PDT) Message-ID: <5293ccd0-cb88-a196-fa26-aa6fe1e3a52a@gmail.com> Date: Mon, 2 Oct 2023 12:19:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [RFC PATCH v2 net-next 02/15] phy: introduce the PHY_MODE_ETHTOOL mode for phy_set_mode_ext() Content-Language: en-US To: Vladimir Oltean , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: "Russell King (Oracle)" , Heiner Kallweit , Andrew Lunn , Madalin Bucur , Ioana Ciornei , Camelia Groza , Li Yang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sean Anderson , Maxime Chevallier , Vinod Koul , Kishon Vijay Abraham I References: <20230923134904.3627402-1-vladimir.oltean@nxp.com> <20230923134904.3627402-3-vladimir.oltean@nxp.com> From: Florian Fainelli In-Reply-To: <20230923134904.3627402-3-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 02 Oct 2023 12:20:18 -0700 (PDT) On 9/23/23 06:48, Vladimir Oltean wrote: > In networking, we have 2 distinct data types: > > - phy_interface_t describes the link between a MAC (or MAC-side PCS) and > an attached PHY or SFP cage > > - enum ethtool_link_mode_bit_indices describes the link between a local > PHY and a remote PHY (for example, gigabit RJ45 twisted copper pairs) > > Currently, phy_set_mode_ext(PHY_MODE_ETHERNET) takes arguments of the > phy_interface_t type, and there is no way to pass an argument of the > enum ethtool_link_mode_bit_indices type. The new PHY_MODE_ETHTOOL > intends to address that. > > It is true that there is currently some overlap between these data > types, namely: > > phy_interface_t enum ethtool_link_mode_bit_indices > ----------------------------------------------------------------- > PHY_INTERFACE_MODE_10GKR ETHTOOL_LINK_MODE_10000baseKR_Full_BIT > PHY_INTERFACE_MODE_1000BASEKX ETHTOOL_LINK_MODE_1000baseKX_Full_BIT > > but those overlaps were deemed to be mistakes, and PHY-to-PHY link modes > should only be added to ethtool_link_mode_bit_indices going forward. > Thus, I believe that the distinction is necessary, rather than hacking > more improper PHY modes. Some of the PHY-to-PHY link modes which may be > added in the future (to ethtool_link_mode_bit_indices and not to > phy_interface_t) are: > > ETHTOOL_LINK_MODE_100000baseKP4_Full_BIT > ETHTOOL_LINK_MODE_100000baseCR10_Full_BIT > ETHTOOL_LINK_MODE_25000baseKR_S_Full_BIT > ETHTOOL_LINK_MODE_25000baseCR_S_Full_BIT > > One user of PHY_MODE_ETHTOOL will be the MTIP backplane AN/LT + Lynx > SerDes PHY combo, where the backplane autoneg protocol (IEEE 802.3 > clause 73) selects the operating PHY-to-PHY link mode. > > There are electrical differences between the PHY-to-PHY backplane link > modes (like ETHTOOL_LINK_MODE_10000baseKR_Full_BIT) and their > non-backplane counterparts (like PHY_INTERFACE_MODE_10GBASER), namely > the number of TX signal equalization taps and their configurability. > This further justifies distinguishing between them in the generic PHY > API. > > Signed-off-by: Vladimir Oltean > --- > v1->v2: rename PHY_MODE_ETHERNET_PHY to PHY_MODE_ETHTOOL at Russell's > suggestion > > include/linux/phy/phy.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index 6be348f1fa0e..72ef4afcda81 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -39,6 +39,7 @@ enum phy_mode { > PHY_MODE_UFS_HS_B, > PHY_MODE_PCIE, > PHY_MODE_ETHERNET, > + PHY_MODE_ETHTOOL, Not feeling very comfortable with using ETHTOOL here because that is a Linux sub-subsystem name as opposed to the other enumeration values which are electrical modes of operation and/or industry standards names. How about PHY_MODE_ETHERNET_EXPLICIT or PHY_MODE_ETHERNET_LINKMODE? -- Florian