From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB9C1C3064D for ; Fri, 28 Jun 2024 14:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1i0qVfn2CH6qX3ZUJgQpekfAmjqv9PBkrjgn7uqTOKk=; b=KV/OfttOwRmEBHtijEW1t3W7t8 kTCHtfIhDSd9ab1j/OuTa8EeN5sW2t+r5NBbRVP/aMoy3qD2Y3IbWPaH8q96pUuDYA1N6gDzOVaJF bNZD5rQjs+vcEBl1foULulX+iHP6cUsAw9bJItEl2uRYpZ7ajgRNg7IkufqgKjC+olyOjk8DJheAR t3Ohp8HRZqIARKWEom7/6QxTQu7eWK0RR5ftVOOFzh/iXd7uukFmpRnKuIEZEWm6gAVEfmAf0S1sc l0vDnjHxr46giqQMsrQ4ZWhq9EkamHk3w5bMG73vQMXCCmB8eMkLuF3/bADCO2MpVJteKEKBNHTyR kHqscdQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNCoc-0000000E3no-0Iww; Fri, 28 Jun 2024 14:43:06 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNCoT-0000000E3lW-1rKF for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 14:42:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1i0qVfn2CH6qX3ZUJgQpekfAmjqv9PBkrjgn7uqTOKk=; b=clXunHBcYa9YTyHafTQarFujMc lzhL7CNhuRniN/1QOI0XxCVEADk5A5U63dhB7rhDKyfUY7RXNDRewcaAb3nHi/QMvHKuBztJ8dOiK RFwCxxNZgubc1Djq8JPLWgnIqVUbQuzSwrt/IVF9AcpPnwSJLSDkNDX7LEOBhbKCo2Qzqqp8R9hpt NJSIVYDCwLbKU93aZynrN/2oSidE8CsWRke9vKwAkjUGqh6U0m/qpTEEjkrchXz1dQ2QrwgETId4d w0FcH4FKdzwplCmj+fddpP2dojT0Du0mamuEP6+PSi059RkrSrfrNPUrWeznXfnGwl4pYVMscN9x1 LIL/XyoA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49280) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sNCoC-0006lH-2O; Fri, 28 Jun 2024 15:42:40 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sNCoD-0006aZ-4r; Fri, 28 Jun 2024 15:42:41 +0100 Date: Fri, 28 Jun 2024 15:42:41 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Andrew Halaney , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexei Starovoitov , Jesper Dangaard Brouer , John Fastabend , Daniel Borkmann , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC net-next v2 17/17] net: stmmac: pcs: Drop the _SHIFT macros Message-ID: References: <20240624132802.14238-9-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240624132802.14238-9-fancer.lancer@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_074257_502835_F86AF401 X-CRM114-Status: GOOD ( 17.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 24, 2024 at 04:26:34PM +0300, Serge Semin wrote: > The PCS_ANE_PSE_SHIFT and PCS_ANE_RFE_SHIFT are unused anyway. Moreover > PCS_ANE_PSE and PCS_ANE_RFE are the respective field masks. So the > FIELD_GET()/FIELD_SET() macro-functions can be used to get/set the fields > content. Drop the _SHIFT macros for good then. > > Signed-off-by: Serge Semin > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h > index a17e5b37c411..0f15c9898788 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h > @@ -43,9 +43,7 @@ > #define PCS_ANE_FD BIT(5) /* AN Full-duplex flag */ > #define PCS_ANE_HD BIT(6) /* AN Half-duplex flag */ > #define PCS_ANE_PSE GENMASK(8, 7) /* AN Pause Encoding */ > -#define PCS_ANE_PSE_SHIFT 7 > #define PCS_ANE_RFE GENMASK(13, 12) /* AN Remote Fault Encoding */ > -#define PCS_ANE_RFE_SHIFT 12 > #define PCS_ANE_ACK BIT(14) /* AN Base-page acknowledge */ I would actually like to see all these go away. PCS_ANE_FD == LPA_1000XFULL PCS_ANE_HD == LPA_1000XHALF PCS_ANE_PSE == LPA_1000XPAUSE and LPA_1000XPAUSE_ASYM PCS_ANE_RFE == LPA_RESV and LPA_RFAULT PCS_ANE_ACK == LPA_LPACK Isn't it rather weird that the field layout matches 802.3z aka 1000base-X and not SGMII? This layout would not make sense for Cisco SGMII as it loses the speed information conveyed by the Cisco SGMII control word. This isn't a case of the manufacturer using "SGMII" to mean a serial gigabit media independent interface that supports 1000base-X (PHY_INTERFACE_MODE_1000BASEX) rather than Cisco SGMII (PHY_INTERFACE_MODE_SGMII) ? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!