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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B23BC38142 for ; Wed, 1 Feb 2023 17:12:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BAD8C4032C; Wed, 1 Feb 2023 17:12:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org BAD8C4032C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1675271567; bh=41KZwlIsXC6+DzcJhATal94M8YaBqq68L10S23BpLuo=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=30E1Q2cAJ35Lw+8Mf6nIiv8tiUmg/BhkeEw60qOOoMVSf0E5A3dMt5MjFHLK0l0Y/ zgP8CF7Wfb5ft0PHnyDSKZO7oxgxcrL4cyICwrLU1Gcc/2ZJbgaMNEBXbYMefTth9T 6x4ARB9u0lK9z87xV0JAPWm4ZdwckQtwGenTCR5XOnnGXZHpJt6y8qSouEX2MzmrIT H2zeGXO0pYIZ80A0sLcj/BpHskkVIhEepmouvLOu+jzb3oj6BaMJhVDFvsCvfKB5P3 /dvLkEvsx3grLt/6vcMzPLtWiMlYFXxfi8RT3UN1Aro3GpL3HujEZ6cVY1nWvX1MCD CvTHkb5nXkfxQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ft8BdOfu98-7; Wed, 1 Feb 2023 17:12:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 8696B4032D; Wed, 1 Feb 2023 17:12:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8696B4032D Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E51421BF29F for ; Wed, 1 Feb 2023 17:12:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id BE358403EA for ; Wed, 1 Feb 2023 17:12:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org BE358403EA X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id poXJRvYBpwwR for ; Wed, 1 Feb 2023 17:12:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1AA644014B Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1AA644014B for ; Wed, 1 Feb 2023 17:12:45 +0000 (UTC) Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pNGet-003ooW-4K; Wed, 01 Feb 2023 18:12:31 +0100 Date: Wed, 1 Feb 2023 18:12:31 +0100 From: Andrew Lunn To: Oleksij Rempel Message-ID: References: <20230201145845.2312060-1-o.rempel@pengutronix.de> <20230201145845.2312060-3-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230201145845.2312060-3-o.rempel@pengutronix.de> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=hGzG/sA63e+whllyzMxtyCU4dN4cHFGosz/XbA42Rbo=; b=QpRVxHzm/Z+iz1HHu18q5ar0Vg bytU7wJkj+A/7MJ2hijJHqPaSPHS8yMZBVyppjYl22azUXzXNZeJixr0tr8sdt0YhqH4FFtxqN/lG gX427TufG1zr5RTVRMP1Gusrm23fPQkN56hivbi1QA044K/AZ2laTtcN0WO9FbwuUFSo=; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=QpRVxHzm Subject: Re: [Intel-wired-lan] [PATCH net-next v4 02/23] net: phy: add genphy_c45_read_eee_abilities() function X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Woojung Huh , Arun.Ramadoss@microchip.com, Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , UNGLinuxDriver@microchip.com, Eric Dumazet , Paolo Abeni , Wei Fang , kernel@pengutronix.de, intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Vladimir Oltean , "David S. Miller" , Heiner Kallweit Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Feb 01, 2023 at 03:58:24PM +0100, Oleksij Rempel wrote: > Add generic function for EEE abilities defined by IEEE 802.3 > specification. For now following registers are supported: > - IEEE 802.3-2018 45.2.3.10 EEE control and capability 1 (Register 3.20) > - IEEE 802.3cg-2019 45.2.1.186b 10BASE-T1L PMA status register > (Register 1.2295) > > Since I was not able to find any flag signaling support of this > registers, we should detect link mode abilities first and then based on > this abilities doing EEE link modes detection. Hi Oleksij There was a discussion along these lines with Chris Healy recently. The meson-gxl PHYs don't have these registers, and reads return 0xffff. The 802.3 2018 standard says the top 2 bits are reserved and should read as 0. Also, it seems unlikely anybody will build a PHY which supports 100GBASE-R deep sleep all the way down to 100BASE-TX EEE. So i would suggest adding a check when reading MDIO_PCS_EEE_ABLE and if it is 0xffff assume EEE is not supported. > + val = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); > + if (val < 0) > + return val; > + > + mii_eee_100_10000_adv_mod_linkmode_t(phydev->supported_eee, val); > + > + /* Some buggy devices claim not supported EEE link modes */ > + linkmode_and(phydev->supported_eee, phydev->supported_eee, > + phydev->supported); That comment could be improved. What i think you mean is /* Some buggy devices indicate EEE link modes in MDIO_PCS_EEE_ABLE which they don't support as indicated by BMSR, ESTATUS etc. */ Andrew _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan