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 2B1DC1D47AD for ; Tue, 26 Nov 2024 13:01:27 +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=1732626089; cv=none; b=RMJ9/EbuCpy4SHUom3ygwc4ZnJP1tCTriL0RaSJTqOIMZy63itVapC3WGxkGtevKilyKRC/a6HQMvFXooyyuJ8PxQt48xtrAydp5UvRv87to+W3iOBIoVRD2WAz31ZHK2tP0JzA1IaBK6dPNCvYgP1gFJJyp4ZseRGZPOILaJVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732626089; c=relaxed/simple; bh=gSCzkAL+GY4gELKymzPajvu0deHxQMrCYAO7s3LsnZY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XHQJfWp3kLRu7Yu4IFjjgRUYa4sB02aQQExYIXXB7xaFjEw+3rTCyeCyCUJLY0B6FjGnLiVsUT/ZIIDEzsIiY+Cc3u7ooKpr8PBgaDuxmZmOQVwaMH/ScU1Ew5O4CSoqzGBeO2P+5/Xx6y7jBHq4vkpcVuWh/mW7+B309Exjw34= 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=sA/wh2Qd; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="sA/wh2Qd" 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=Ky6HbS31SSAdMYxozY6xIMAs0Cpmlvp4GWo+IUxC3Gc=; b=sA/wh2QdMDG6PLLquxIEEkTzeN r8oRRbixq8aAWGNui9FskfeZ+s+CruyDf1QNYcJu1YTw1B59tqTMhKJR5jcBCUo9aYxQfbbZSAbcy UpRmoq+0oztPAtiTZR6Jf3kg5fvS/1q+fWAJT5LrwrQ3ap6KoivSQLAQ9JoXquDPGhH60kjpyU37Z ch0Ypjw60dLf9Z4KZrdjMH+PaZkow2p6pzin2z+wpe5l+BuIFlWrY+PUbynf8x03RargY5D9GF0m1 X4wNGVCYilk3TcsMtkI4sJ0U6Rpug2xNX4sO5o4186DptWdSkvOXoUIFEfbvq1X8w7oRZhuxM13zB aQRGky1w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54564) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tFvBq-00070g-17; Tue, 26 Nov 2024 13:01:15 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1tFvBn-0004ZI-1q; Tue, 26 Nov 2024 13:01:11 +0000 Date: Tue, 26 Nov 2024 13:01:11 +0000 From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , Bryan Whitehead , "David S. Miller" , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Jose Abreu , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Marcin Wojtas , Maxime Coquelin , netdev@vger.kernel.org, Oleksij Rempel , Paolo Abeni , UNGLinuxDriver@microchip.com Subject: Re: [PATCH RFC net-next 00/23] net: phylink managed EEE support Message-ID: References: Precedence: bulk X-Mailing-List: netdev@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 Tue, Nov 26, 2024 at 12:51:36PM +0000, Russell King (Oracle) wrote: > Patch 11 adds phylink managed EEE support. Two new MAC APIs are added, > to enable and disable LPI. The enable method is passed the LPI timer > setting which it is expected to program into the hardware, and also a > flag ehther the transmit clock should be stopped. > > *** There are open questions here. Eagle eyed reviewers will notice > pl->config->lpi_interfaces. There are MACs out there which only > support LPI signalling on a subset of their interface types. Phylib > doesn't understand this. I'm handling this at the moment by simply > not activating LPI at the MAC, but that leads to ethtool --show-eee > suggesting that EEE is active when it isn't. > *** Should we pass the phy_interface_t to these functions? > *** Should mac_enable_tx_lpi() be allowed to fail if the MAC doesn't > support the interface mode? There is another point to raise here - should we have a "validate_eee" method in struct phylink_mac_ops so that MAC drivers can validate settings such as the tx_lpi_timer value can be programmed into the hardware? We do have the situation on Marvell platforms where the programmed value depends on the MAC speed, and is only 8 bit, which makes validating its value rather difficult - at 1G speeds, it's a resolution of 1us so we can support up to 255us. At 100M speeds, it's 10us, supporting up to 2.55ms. This makes it awkward to be able to validate the set_eee() settings are sane for the hardware. Should Marvell platforms instead implement a hrtimer above this? That sounds a bit problematical to manage sanely. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!