Received: by 2002:ac8:4b50:0:b0:42d:ce8e:db0a with SMTP id e16csp746037qts; Fri, 23 Feb 2024 03:29:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXWmx3yd+vi1UxkoK/JoE6AV/uRPEdIS8pO9HfQ7LVsYP0wyuMd7Qttkhpx1+VS9HJdHpn3Rnl2vG+z73V0Km2i/OQGd5QubTfNeBlSiA== X-Google-Smtp-Source: AGHT+IElqzZgNBqHVxRrTjEKzWXu/g7Xbd9GhOEIAInms54kVe837ktoANOMYkkJ8drwTCgb/uGa X-Received: by 2002:a05:6a20:3b27:b0:1a0:d114:bf8f with SMTP id c39-20020a056a203b2700b001a0d114bf8fmr1404454pzh.26.1708687327817; Fri, 23 Feb 2024 03:22:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708687327; cv=pass; d=google.com; s=arc-20160816; b=soW4fNj8WFex6eiBVLvRuzDWDdXW1BRBC4OFlIOxUajkWqA6HM9kgyMy4LnTf+hPlN bTwLuYGo4Qn8cy9vrWMBh/D6C1/C1kJRYYzwzLQS9w2KUhDqZZMJ70q9gWzwMXgR+a2m O4RPllm66aEmq0lhP0wQBEyX0HNYHkA++T/yFrRMascWJuC4ZuS3eZ6G229RjcxYMPtg v8jHhkwyrJvljoL4rHWm0tahBpGKoZRTASOzdXSXMZh3Duw1gtnHd2LRa7NHUaNSdshl yc35pBsEN2pVl+sNsQuH134GyRLhHfYBAr84l8cRMEuVPnjNAWpwe2nJc9APgpQDdjie hGjQ== 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=eOoP1B49M2U+RuY8cj+gGulW+f80SLlRYJjbhFcwxtU=; fh=eo1dEpfelxc1sOz9xILwUaG+1yI0CiL4f4hvKIuQDsk=; b=NU5r5xstoYQiBBKFJJj/DCwR9rEG+8g/7/3ZMN7x/Lhs/xvaZ9VONMwwfdSdZGdaff r+xoOfK3Tm/DC4ByHmD/ulhVBN9xOvwWuy3OYxvd/qNec4lruLO/fjFcHLA7v+5HUV+8 ELo20METVgGnQtY+bmDH13g4vvyWU3R/ncT/NcqQpDFQh/d9cPyRwAqoI8xZwo7CbSYG kCxzeCNvN1f10VVVL0TRecK9BcwRo6DKPUh3LVLIxyXbb94kVeBTg3F4wTaqHvIqUbo6 2kk5PlL34W/uNGqK5n4RJ1MixTN1OdOZ1+TN/AAgYwYo/gd9ZEfgID7i/YQoQTDVmp6Z ME2Q==; 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=guQOBZjs; 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-78207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78207-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 sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u185-20020a6385c2000000b005ce016cce2bsi11660960pgd.190.2024.02.23.03.22.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:22:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=guQOBZjs; 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-78207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78207-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 837E12868A7 for ; Fri, 23 Feb 2024 11:22:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22E1976911; Fri, 23 Feb 2024 11:21:51 +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="guQOBZjs" 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 DF1BD604D0; Fri, 23 Feb 2024 11:21:47 +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=1708687310; cv=none; b=h2UMyXpQ/eVE6Ok1E1/P4hQKYI89K83FZSzd/A1vxe6s219vu+Qb40SEoZAoHCTydMDNdFwPJ7NTNIHrFooIYrFYuY2ToTlgfM1I4RPT08fpP3JMCjE34dqQKbJ7nC7ydD6SbpSX99r+AVknbgCvjzRLrEBQ2Ipc8absopVBLxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708687310; c=relaxed/simple; bh=peReEDJGy04XpZdGr/L1b7dThSp0Y81LgLaHw20Wg6E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ek9UHVAD4I1HizDiHgdghtZFvczxCITMI+BTcwF+9ORyrm7WzGKsFWCn17rI0UcmRktbz2UQeIwHj/LuVWZWlsqJhU3xQnTojYMc6zQiaBEamzLl3WK9s33fsz1qetOHr7Fny36jQCz2u9Ohz+no6EZx4ei5/p3xgMNoMz1pto0= 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=guQOBZjs; 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=eOoP1B49M2U+RuY8cj+gGulW+f80SLlRYJjbhFcwxtU=; b=guQOBZjsMDgz0rR25wfeUMMD0Q oIWDKOtbyY9hY0VpWCFzndeMPwNC68VJ3dIRDuErL4jWsyltBrDmfgPSkl5CeQ8SjJ6dIAj0UXE8j ZLQLEOWecfcIabJYcDuw6IzzL9g12yG61NBEA3VLhEvkn75TOiGRJBChDetpMwURtsFmW0MckMge6 Xq4mi8i38/XQ28lSLxjq64H16PnpAtdErD+Pe85WRdiMKDsgPLTpbo/ia839+z6IPc7+Ym+RuCa4/ aAd8AjFqBH8+lnF1IBr+gjnovXnuiAEmMep/hFRWMoCjIUzr0fRBrd9KNCiBwKYzY+++8yKxapygk oXtE8Zbw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57004) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rdTcZ-0007cn-0A; Fri, 23 Feb 2024 11:21:39 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rdTcW-0003a8-PX; Fri, 23 Feb 2024 11:21:36 +0000 Date: Fri, 23 Feb 2024 11:21:36 +0000 From: "Russell King (Oracle)" To: Florian Fainelli Cc: Oleksij Rempel , Wei Fang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Shenwei Wang , Clark Wang , NXP Linux Team Subject: Re: [PATCH net-next v5 6/8] net: phy: Add phy_support_eee() indicating MAC support EEE Message-ID: References: <20240221062107.778661-1-o.rempel@pengutronix.de> <20240221062107.778661-7-o.rempel@pengutronix.de> <9e37a9e9-7722-407c-a2a5-b8c04b68f594@gmail.com> 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: <9e37a9e9-7722-407c-a2a5-b8c04b68f594@gmail.com> Sender: Russell King (Oracle) On Thu, Feb 22, 2024 at 08:52:25PM -0800, Florian Fainelli wrote: > > > On 2/20/2024 10:21 PM, Oleksij Rempel wrote: > > From: Andrew Lunn > > > > In order for EEE to operate, both the MAC and the PHY need to support > > it, similar to how pause works. > > Kinda, a number of PHYs have added support for SmartEEE or AutoGrEEEn in > order to provide some EEE-like power savings with non-EEE capable MACs. > > Oleksij did not you have a patch series at some point that introduced a > smarteee field in the phy_device structure to reflect that? I thought that > had been accepted, but maybe not. I have some similar hacks for the Atheros SmartEEE in my tree that I've never published. For SmartEEE, we need two things to happen: 1) MAC drivers must not fail set_eee()/get_eee() just because they themselves do not support EEE. 2) MAC drivers must not attempt to modify the EEE parameters passed to phylib. Whether a MAC driver should be configuring the hardware in set_eee() at all is another question - because in the case of using SmartEEE the MAC side is irrelevant. So maybe phylib should have a callback to set the EEE TX LPI parameters? In phylink, my model was to add two new functions (one to enable and another to disable TX LPI) and the enable function always gets passed the TX LPI timeout. If we did the same in phylib, we would eliminate the need for MAC drivers to conditionalise based on SmartEEE - that could be handled entirely within phylib. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!