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 51438C4828D for ; Tue, 6 Feb 2024 11:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dmv609Q2OcIM3o1FVrPT++FqoeN7bpC+c2dEyfbzqjc=; b=GvEmDJwHIAUL7g zBGnuCdC1AcAxBTeKJzbz0L8skGLJOAmGq+2X6QgTxQACu9xrxeGLoY1LTQaBNRrgV9A06OV6nJqO QMAhuLHlc3S2zKgPL5OcHTioI32+RgQBi2TVHu9lxN2vpX5hC14lMCRnMr8Frmr/tDXKPmCILNoVt i36EOmQts0QFlraKAlHiRn/taGygG9x1XZUH9SDn8WVKSeoQPA/yp4p5/b8WkAwbs2OsCAnZWevzE jlftbnAj9wpp8Go/BfUjO+df/Jl0YVQSrIplv+/I6Ff+hM7d1W8tcn0O1ST8uyxIMAsp7doez1Ycs aqCoZOiGNOQvldFWEFsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXJVB-00000007Hrc-3ugk; Tue, 06 Feb 2024 11:20:33 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXJV8-00000007Hpg-1gDF for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 11:20:32 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d09fefabc1so31531061fa.1 for ; Tue, 06 Feb 2024 03:20:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707218427; x=1707823227; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sZUkF6qQkW68JTbbtNstjqI5lBDrxSml80X/oZkP6Jk=; b=j8jAq47NS68g+SUsREnJ4fEPuNtx/91vI3ei+HXyCRDgZ6gg6JJ3q2NOxoCCPX5PHJ eFHyiecnaaIX4SqXNljibF5I8tznMkjxGSp48rzRyyrTrjX+JYn/zbJ2chKEi81ei1Ys TkBLxUPIG+hEJG0R78b2tDgVJrDIrm0RQCgHYk2uHq6wOy7TPi1WD/r6hhvHryt33xDX 4B0NdkPDO1tLM1weRs7VmiCpemuJhbn6wHlVitK24s6wXuEkpl9K07pZAydVLvvIczw9 gMdI3D9GzDDxazyT5L/x67H5XQ7wmkivV/p8bpT++l5NAuOjZs+x1T1ddLhCC211HkQR mVAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707218427; x=1707823227; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sZUkF6qQkW68JTbbtNstjqI5lBDrxSml80X/oZkP6Jk=; b=XmRw72W76arIL8gx2CXSpiM5mBNrLGRu86Z77xRBCm9kRDmuImAFu9LFXs9emQdMZK 4FLycRH0CZHjLPBre562atysaEi/bYxhddMqmPY+gPfKLjXVy7kyHTcsC8pyXt6kABAN 4VfKayjL3WUScW/GA0luaxSuA+xfgb62lVfOdo+iGIPocpy9WxRx+zXlM8Du+w7lS8ap B9/F6nq9I55gJ7QHDhPFFpObxvLFkZh4Ilxp4CoOxG9zIJydLUXe8qAXWkOpCMGL1Mzk gLQ4BBKUXFUf+wis7EVNmMH6/s4ZurAZg4mRsWSYxBrwCsZhqp/6QWnjxEINDSfXRlsC 4f3w== X-Gm-Message-State: AOJu0YyIc2yoNvJNVzLdXp9xGjk6JbwTr6iiCeo6ThTQ/IthiFWr1e80 OG4smsWFwZQjEqqIpHoB/jXjfC4nGvRzoRTYKAjweJHqbzujVWVZ397KpZGRHonjYA== X-Google-Smtp-Source: AGHT+IHW2LkipLfX++vRM5dnDW6bduLO6JoK+Xv12mfq908JaY4bohgwFQKI2raGy/UuCHKa9YF1yA== X-Received: by 2002:a05:651c:d5:b0:2d0:9a6e:106 with SMTP id 21-20020a05651c00d500b002d09a6e0106mr1807106ljr.43.1707218427282; Tue, 06 Feb 2024 03:20:27 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU8bYPaI3YnkZ9qObyT85rw9Qb8bPNkodfCON7S9bFI2g3Gp2FvLh44VCCd1nIXzAo0B9ZFUZHtoKmw+OQMBaV5wFUEi7okjcvOXXM2erXPOjb2kpL6G22QFBuiiDxoK62+79Axr25HLQzomCTTxoabKgEC2Q5nVG8/eAPeYqmzjybtC7L5U0VDv6jimT00eScRUEXmoFWrHQoy3wtd4iCl/tkWxKedPbgMIkuq47/ABLm/5r/7cJoiXPdk3E90Hc5G4oq0BOHzzsY5lEZiw0pj/ZVTylnhpxd+cczPUjdXgfGHAk79FgB1d4SYFWw1jADQfLv476Yi5kPH5rDzo4WAEiwm3ylHTfG+XHn2Fl6lOAbfhRwwUpDPEezP1PpSaoAcqI+VzkDkTvSJFE9b+NAljPTwmWk4DRrfUT0XLJHBiewTLqEcedFIVxU7avLKHC8Jv3sXOM6R47W+czO/we8MjegmMxPPxHvL1/B6S69QKyryLLaQ0z5D6n1yxpePuHLyPLfs/SPeAiByM6CY2ON4RYmCGC38j62t9GNjhe/HPkTT1bVj15MwCZ9hF2VResSHXmFFl2sBxcrn43PwVPRFnRzwiVcmxFVBn6IDAjWjss6UE8nGcT2wFH1M7A0qGkPic7nTD3FIe474uaTpFMN8kXtxKQh016Lr3LRc1OtlM/Qa6YHANwJb08xUVXOqcN7vTIAf9axrZ6QvTYzz7XIjyEv9 Received: from skbuf ([188.25.173.195]) by smtp.gmail.com with ESMTPSA id kt12-20020a170906aacc00b00a36c7eb251bsm1029561ejb.157.2024.02.06.03.20.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 03:20:27 -0800 (PST) Date: Tue, 6 Feb 2024 13:20:24 +0200 From: Vladimir Oltean To: "Russell King (Oracle)" , Florian Fainelli , Doug Berger Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , bcm-kernel-feedback-list@broadcom.com, Byungho An , Clark Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jose Abreu , Justin Chen , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, NXP Linux Team , Paolo Abeni , Shenwei Wang , Wei Fang Subject: Re: [PATCH net-next v2 6/6] net: dsa: b53: remove eee_enabled/eee_active in b53_get_mac_eee() Message-ID: <20240206112024.3jxtcru3dupeirnj@skbuf> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_032030_469230_E9E084FB X-CRM114-Status: GOOD ( 23.14 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Feb 04, 2024 at 12:13:28PM +0000, Russell King (Oracle) wrote: > b53_get_mac_eee() sets both eee_enabled and eee_active, and then > returns zero. > > dsa_slave_get_eee(), which calls this function, will then continue to > call phylink_ethtool_get_eee(), which will return -EOPNOTSUPP if there > is no PHY present, otherwise calling phy_ethtool_get_eee() which in > turn will call genphy_c45_ethtool_get_eee(). Nitpick: If you need to resend, the function name changed to dsa_user_get_eee(). > > genphy_c45_ethtool_get_eee() will overwrite eee_enabled and eee_active > with its own interpretation from the PHYs settings and negotiation > result. > > Thus, when there is no PHY, dsa_slave_get_eee() will fail with Here too. > -EOPNOTSUPP, meaning eee_enabled and eee_active will not be returned to > userspace. When there is a PHY, eee_enabled and eee_active will be > overwritten by phylib, making the setting of these members in > b53_get_mac_eee() entirely unnecessary. > > Remove this code, thus simplifying b53_get_mac_eee(). > > Reviewed-by: Andrew Lunn > Reviewed-by: Florian Fainelli > Signed-off-by: Russell King (Oracle) > --- > drivers/net/dsa/b53/b53_common.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c > index adc93abf4551..9e4c9bd6abcc 100644 > --- a/drivers/net/dsa/b53/b53_common.c > +++ b/drivers/net/dsa/b53/b53_common.c > @@ -2227,16 +2227,10 @@ EXPORT_SYMBOL(b53_eee_init); > int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e) > { > struct b53_device *dev = ds->priv; > - struct ethtool_keee *p = &dev->ports[port].eee; > - u16 reg; > > if (is5325(dev) || is5365(dev)) > return -EOPNOTSUPP; > > - b53_read16(dev, B53_EEE_PAGE, B53_EEE_LPI_INDICATE, ®); > - e->eee_enabled = p->eee_enabled; > - e->eee_active = !!(reg & BIT(port)); > - I know next to nothing about EEE and especially the implementation on Broadcom switches. But is the information brought by B53_EEE_LPI_INDICATE completely redundant? Is it actually in the system's best interest to ignore it? > return 0; > } > EXPORT_SYMBOL(b53_get_mac_eee); > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel