Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp981456lqg; Sat, 2 Mar 2024 09:33:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW+Ap8ekC3Ls6NFFFR6m8rSRybmk6xF5VkMWWEoq6zmooKQMPm3t2lrMkG5SfWB9cosUgoZWEFrrTr0F9oXfv4qF/0hdHuxrI9XXX/wXw== X-Google-Smtp-Source: AGHT+IGlzNvpQs1GjGLr+Y+LvKwznBhHBoVctE6Pi/QmMkZ9jOCFiuaF+gsOOBPx0NVnHyh5SXYg X-Received: by 2002:a05:6871:3a07:b0:220:be4a:1df1 with SMTP id pu7-20020a0568713a0700b00220be4a1df1mr4162936oac.24.1709400838001; Sat, 02 Mar 2024 09:33:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709400837; cv=pass; d=google.com; s=arc-20160816; b=rtp3rmAytYriTFLl1LjY3hqIdh7dCC5E5zKAbU3R+2hVrEkCv1VFtMKrS1puvHHyku ljs824RQwqaV1MPcfoATOvFDdsEzcN/ACAxiQKd2jOPGfn7aDr95pgwY0JlnPiOC+ml0 B2vEJqWnbDy6FZzgo+N4RNOIsERlianUmWywxUsBu1ZlzUgkncjOEAAtZcHlGrcQbm5M QwPBoPOTNybjRGBdwMua+qE2hT6gjZlR3ot10tWb2GBz0wDdf3iDmEM79Gb52OiDsPah 3/A6bMb2hRVOnfJJqNc42QV6SxoynZBmVCGGTOt1QE1fNnuhS12UI8av8dG6HETXC3KA wfdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=SCSvTS84dtDPixkR5UknuDrt5ZxGw8Irc52+regEcFc=; fh=er4d/8CFnG9aZNtEU1WLoUMOk8Zr1V3oHh4jE1pehLQ=; b=xlRSuwiSRn5i72D75DZnqQsD1C1Dw7Y1arQ5rGjdyDSSu0FO2SH0BIOnQJQC3hY7++ oHXAoeaMadw9eTJGLcEn/KArawqHFTfJ1xObPNtM198QtZK1v8uAYds2K6uzpQS8kiK4 x8GecvNHfsZRtKaBuZv1N2tHrLkrUKp+Qd44TBh4SifZ3179puXqzmhpLTUbiwTO7JwA oDn0bAqrw0aO8OlfFUYYHDB/PD+j6s4DTUmLf9xltu8haFudBbnyFyPIoNjUroTXtrhq Swm+z64sLeAibEcwYIC0RcK8ftBfMWR8AApTb7Ou0+TXILXUIhhntsQSPoaLFtdYd8LI JMsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Q7cc409v; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-89535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p12-20020a05620a112c00b00787d6829bdfsi5918898qkk.138.2024.03.02.09.33.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 09:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Q7cc409v; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-89535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A21F01C2142F for ; Sat, 2 Mar 2024 17:33:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B40B32BB14; Sat, 2 Mar 2024 17:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Q7cc409v" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 C453D2576E; Sat, 2 Mar 2024 17:33:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709400828; cv=none; b=vFHFLni5t/9mqQZrVafb606YoVm/ThKUKUjKgjUjBVqrL6pTCsofKBmz9QByBRulgS2+BmipjepMsz7lEu1HKcYUton3iQZ3XBCTaqgGWSn8rmBJrzNpN0pzX1BjeUSyjF33shIOL4tlCif3cEKVRfcS4vDSiq9Exz0VSRfpOjU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709400828; c=relaxed/simple; bh=7wzKlRr3KNoyYV+XJySI9N+Suy6+yQ4gF1JspQ+dKgs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SyHrKNf4Uyz+GruAm/Bkhdwya4SgaxNmPXY0o/uJPWac1Kqx6Iy78Rraw3vc9V6JGiJvreKaKchFFHgtBOMPu8WJqHgybtNns4b6hp7vrPdOs7NEJzlXpWqN2Nf3sL2xgaSi80aFkjLta6chWpfJJKUvo1oe4DnP1KOkucZF0lo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=Q7cc409v; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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=SCSvTS84dtDPixkR5UknuDrt5ZxGw8Irc52+regEcFc=; b=Q7cc409vjN3T4oKQsoWEker1H4 ihswIy+PKzLflbmvDzFw9rL3tEx0LSq3SRznJGoJneHaACzJYOhq37zR3aI6fR5kMv9d79aJgzFAY WRHhlqbug1shcyQ+SojkZmUAxvn9iGCOjao52aHHEsmL3POhjqibA1ZPTRFLmHkODFITQaEJg8BTj 82ICoDNChrJ0M4pRUnXIAgIfBIFiQoUOImwWKMiK5Mm5zEIfXUEvlsK7KVvM44j9RKELdvLe1Z0AR MFdU8i4kP8RtWldorVIyQz/MOh4maLHE/1S0/3l6jMPH+1Mx37uPMyIUCFhDRS2dj1B1eAjCr8Jpz cWxmokKg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48120) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rgT7N-0002nv-2e; Sat, 02 Mar 2024 17:25:49 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rgT7K-0002oq-1G; Sat, 02 Mar 2024 17:25:46 +0000 Date: Sat, 2 Mar 2024 17:25:45 +0000 From: "Russell King (Oracle)" To: Heiner Kallweit Cc: Oleksij Rempel , Wei Fang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Shenwei Wang , Clark Wang , NXP Linux Team Subject: Re: [PATCH net-next v8 3/8] net: phy: Add helper to set EEE Clock stop enable bit Message-ID: References: <20240301100153.927743-1-o.rempel@pengutronix.de> <20240301100153.927743-4-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) On Sat, Mar 02, 2024 at 06:16:34PM +0100, Heiner Kallweit wrote: > On 01.03.2024 11:01, Oleksij Rempel wrote: > > From: Andrew Lunn > > > > The MAC driver can request that the PHY stops the clock during EEE > > LPI. This has normally been does as part of phy_init_eee(), however > > that function is overly complex and often wrongly used. Add a > > standalone helper, to aid removing phy_init_eee(). > > > > Signed-off-by: Andrew Lunn > > Reviewed-by: Florian Fainelli > > Signed-off-by: Oleksij Rempel > > --- > > drivers/net/phy/phy.c | 20 ++++++++++++++++++++ > > include/linux/phy.h | 1 + > > 2 files changed, 21 insertions(+) > > > > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c > > index 2bc0a7d51c63f..ab18b0d9beb47 100644 > > --- a/drivers/net/phy/phy.c > > +++ b/drivers/net/phy/phy.c > > @@ -1579,6 +1579,26 @@ void phy_mac_interrupt(struct phy_device *phydev) > > } > > EXPORT_SYMBOL(phy_mac_interrupt); > > > > +/** > > + * phy_eee_clk_stop_enable - Clock should stop during LIP > > + * @phydev: target phy_device struct > > + * > > + * Description: Program the MMD register 3.0 setting the "Clock stop enable" > > + * bit. > > + */ > > +int phy_eee_clk_stop_enable(struct phy_device *phydev) > > +{ > > + int ret; > > + > > + mutex_lock(&phydev->lock); > > + ret = phy_set_bits_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL1, > > + MDIO_PCS_CTRL1_CLKSTOP_EN); > > + mutex_unlock(&phydev->lock); > > + > > + return ret; > > +} > > +EXPORT_SYMBOL_GPL(phy_eee_clk_stop_enable); > > + > I don't see a user of this function in the series. > Based on the commit description, wouldn't it be better to > make this patch part of a future series removing > phy_init_eee()? That depends who is going to do that work. If it's individual driver maintainers, then I think we want this to go in along with this series so that we don't end up with individual driver maintainers having to carry this patch, and submissions ending up with multiple copies of this patch or depending on other maintainers submissions. On the other hand, if someone is going to go through all the network drivers and update them as one series, then it probably makes more sense to move this to that series. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!