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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B13D2C636D4 for ; Fri, 17 Feb 2023 11:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229976AbjBQLgi (ORCPT ); Fri, 17 Feb 2023 06:36:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbjBQLgh (ORCPT ); Fri, 17 Feb 2023 06:36:37 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F1023D0BB for ; Fri, 17 Feb 2023 03:36:36 -0800 (PST) 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=W+YsRUlNaiXMpg9VJgTEYJkNxt4Tmw2+nkaFNbmCtSQ=; b=vtgaapiUxlmW63poR9iekDLnX1 fax4PkrNgxM6O1VVuOGt5oXoLwx520LAZe5Phr/iNBTzxHg/1o55bDz10sy0aD+x4ipbhzVELu1nt wgdbpfVNp8lvxhfHVBtDOMp1pl5Q/cRfEtYZAlqDPV3rx8GcJiXBZVJ+0uIYHllAPugopawXpy9Xo I8omFxfo2udcyGoSyTbzMqQ2pNX6S1zJOMVlj0ljQgNiPGnV2lGsWKcMNEcq9y4MUw6+neM1NgIon xzHAHixABk8Iz6u8YCDMDYV0DTDprNXoFM4edigcyeJwz6ow3IsjhPls/GfqeG1KvUpofPNcdjaL1 A5YaawDw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:37382) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pSz2X-0000qM-A3; Fri, 17 Feb 2023 11:36:33 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pSz2V-0006kX-Ig; Fri, 17 Feb 2023 11:36:31 +0000 Date: Fri, 17 Feb 2023 11:36:31 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: netdev , Florian Fainelli , Vladimir Oltean , Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , AngeloGioacchino Del Regno , Doug Berger , Broadcom internal kernel review list , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , UNGLinuxDriver@microchip.com, Byungho An , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Heiner Kallweit , Woojung Huh , Oleksij Rempel Subject: Re: [PATCH RFC 01/18] net: phy: Add phydev->eee_active to simplify adjust link callbacks Message-ID: References: <20230217034230.1249661-1-andrew@lunn.ch> <20230217034230.1249661-2-andrew@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230217034230.1249661-2-andrew@lunn.ch> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Feb 17, 2023 at 04:42:13AM +0100, Andrew Lunn wrote: > MAC drivers which support EEE need to know the results of the EEE > auto-neg in order to program the hardware to perform EEE or not. The > oddly named phy_init_eee() can be used to determine this, it returns 0 > if EEE should be used, or a negative error code, > e.g. -EOPPROTONOTSUPPORT if the PHY does not support EEE or negotiate > resulted in it not being used. > > However, many MAC drivers get this wrong. Add phydev->eee_active which > indicates the result of the autoneg for EEE, including if EEE is > administratively disabled with ethtool. The MAC driver can then access > this in the same way as link speed and duplex in the adjust link > callback. > > Signed-off-by: Andrew Lunn Yay! Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!