From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 607D814B06C for ; Wed, 8 Jan 2025 14:23:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736346236; cv=none; b=MN5QefSt2WB6aIp30YMtirDwB3OXS8YJaHt6irQ98RuR2MGEYKTW+U7xOhRxrEoOXyB3BypCPPp/1T1AKm0vR0UF3wXaJoqYWKBxqbn/Dy1xtdh5EZXPZ4DgpqByZsGhgpq8Lr+N2K3cr7Y8lPquFadZi9bYoRKIqIKokjNSjqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736346236; c=relaxed/simple; bh=xDXsJqUaiLZ9JhLCyp0bcyYKe1J0NmIL35fYxXZhZak=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rZQ3iNhnuh3tNgm1sQEcmQgfRLi/5Q4hBr9eUcxUSj+CTbcnl6rktO01iI6tOKptVQfTRQ1/lbTHWFTEVmYsACs9BBsnzYv2RTVXj1gytJfqkwCcVZISMGWzhG77C7f2JHxZq99ZolP4IdgoI8KVjDZ0pUtbyQLxAtbAMFPGszQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tVWyB-0006pC-0J; Wed, 08 Jan 2025 15:23:39 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tVWy8-007XKC-2r; Wed, 08 Jan 2025 15:23:37 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tVWy9-00BX9o-1n; Wed, 08 Jan 2025 15:23:37 +0100 Date: Wed, 8 Jan 2025 15:23:37 +0100 From: Oleksij Rempel To: "Russell King (Oracle)" Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Woojung Huh , Andrew Lunn , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Phil Elwell Subject: Re: [PATCH net-next v1 7/7] net: usb: lan78xx: Enable EEE support with phylink integration Message-ID: References: <20250108121341.2689130-1-o.rempel@pengutronix.de> <20250108121341.2689130-8-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=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Wed, Jan 08, 2025 at 12:47:37PM +0000, Russell King (Oracle) wrote: > On Wed, Jan 08, 2025 at 01:13:41PM +0100, Oleksij Rempel wrote: > > Refactor Energy-Efficient Ethernet (EEE) support in the LAN78xx driver > > to integrate with phylink. This includes the following changes: > > > > - Use phylink_ethtool_get_eee and phylink_ethtool_set_eee to manage > > EEE settings, aligning with the phylink API. > > - Add a new tx_lpi_timer variable to manage the TX LPI (Low Power Idle) > > request delay. Default it to 50 microseconds based on LAN7800 documentation > > recommendations. > > phylib maintains tx_lpi_timer for you. Please use that instead. Just using this variable directly phydev->eee_cfg.tx_lpi_timer ? > In any case, I've been submitting phylink EEE support which will help > driver authors get this correct, but I think it needs more feedback. > Please can you look at my patch set previously posted which is now > a bit out of date, review, and think about how this driver can make > use of it. Ack, will do. It looks like your port of lan743x to the new API looks exactly like what I need for this driver too. > In particular, I'd like ideas on what phylink should be doing with > tx_lpi_timer values that are out of range of the hardware. Should it > limit the value itself? Yes, otherwise every MAC driver will need to do it in the ethtool_set_eee() function. The other question is, should we allow absolute maximum values, or sane maximum? At some point will come the question, why the EEE is even enabled? The same is about minimal value, too low value will cause strong speed degradation. Should we allow set insane minimum, but use sane default value? > Should set_eee() error out? Yes, please. > I asked these questions in the cover message but I don't think *anyone* > reads cover messages anymore - as evidenced by my recent patch series that > made reference to "make it sew" and Singer sewing machines. No one > noticed. So I think patch series cover messages are now useless on > netdev. lol :) -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |