Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp4035904rdb; Wed, 30 Aug 2023 13:28:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGH/hYbu1vccUpQrocXb9yPNxyTNb+G5dA5To90R2H2oJtddz727GIocRY/ijhbaRXrB5Qq X-Received: by 2002:a2e:99d4:0:b0:2bc:ff80:f639 with SMTP id l20-20020a2e99d4000000b002bcff80f639mr2416773ljj.7.1693427306533; Wed, 30 Aug 2023 13:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693427306; cv=none; d=google.com; s=arc-20160816; b=nW/hfcLzWEYhuJHgr3eucHOJDlzmkjnyZGOlB1DlKBrUeznHEnlN3eOCe/1ihRWM3J oQwld7a9mcnN+2a5/oCs3KEu26UXe+pdR+sp/wIZ2tqwm9k56qRwNv/nDMy32Yl6hXWK Z5rSIAA4UDhvk1PQ+Juuhc99jcWvht0dZOqlD17pzxs8VJkQXNBJ4h8xeW5BtUCCOBo5 xKwmj9GbhukqxH0dHM0j3GsiGsPR+ks6KMni+2LVv/YmdlnDbevfCJdaSCyczLma1Az5 P1Vafgd0P+8Aq4OKxV65OzP8XRLGTiXxoXsMvhrgqgbvjAG5Y9fAY+wJW386chcYhhLI VJ9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=5lUuMRpCnHgO9Zo4myRVjbt0hiv/ZAVPCtWmX56kLsY=; fh=5DdKXyzHrDcxbf4UC8XWA9cYxHBN+cpxZrdTPX2S8gk=; b=qhFKhUu1ezk2jzi2gdEqRSnT19YR2QdXNSe27OntHCZtdFTmSLgTgITMCntqmO5wQa uCz2lBJ25vdmMqjcH0ZVqpp0l+Fj7FZzBvYtoq/o58J9AC22ihS4bpp1tD77LHtIO+vI TKleOFCEpcTaRLbmdE5lwaaTbRy67zx8qa2Ig7fZMlZI4TAAL0SN16bbNOzDCjbkR31r ajNGCJxeXd3eTuSMvUCvoVr/k2DcrGAyQD6JmxS5PhU0qVPee27Bpcztvq9kawxw5drp 0VAOE7vcasiEjzT/+R8jParEkn3AK6lKP24qsF9qKyofsEr68P6fHMJ60ipfQsb/XqY7 M8yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a170906044c00b009a205e2e6e3si6312053eja.231.2023.08.30.13.27.56; Wed, 30 Aug 2023 13:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237046AbjH3TaG (ORCPT + 99 others); Wed, 30 Aug 2023 15:30:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244039AbjH3MSC (ORCPT ); Wed, 30 Aug 2023 08:18:02 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C765B198 for ; Wed, 30 Aug 2023 05:17:58 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qbK8h-0006sH-9B; Wed, 30 Aug 2023 14:17:39 +0200 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1qbK8g-00012d-51; Wed, 30 Aug 2023 14:17:38 +0200 Date: Wed, 30 Aug 2023 14:17:38 +0200 From: Oleksij Rempel To: Lukasz Majewski Cc: Eric Dumazet , Andrew Lunn , davem@davemloft.net, Woojung Huh , Vladimir Oltean , Tristram.Ha@microchip.com, Florian Fainelli , Jakub Kicinski , Paolo Abeni , UNGLinuxDriver@microchip.com, Russell King , Heiner Kallweit , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] net: phy: Provide Module 4 KSZ9477 errata (DS80000754C) Message-ID: <20230830121738.GJ31399@pengutronix.de> References: <20230830092119.458330-1-lukma@denx.de> <20230830092119.458330-2-lukma@denx.de> <20230830101813.GG31399@pengutronix.de> <20230830125224.1012459f@wsk> <20230830105941.GH31399@pengutronix.de> <20230830135151.683303db@wsk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230830135151.683303db@wsk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 30, 2023 at 01:51:51PM +0200, Lukasz Majewski wrote: > Hi Oleksij, > It looks like the most optimal solution would be the one proposed by > Tristam: > https://www.spinics.net/lists/netdev/msg932044.html In this case, please add the reason why it would work on this HW and will not break by any changes in PHYlib or micrel.c driver. If I remember it correctly, in KSZ9477 variants, if you write to EEE advertisement register, it will affect the state of a EEE capability register. Which break IEEE 802.3 specification and the reason why ksz9477_get_features() actually exist. But can be used as workaround if it is written early enough before PHYlib tried to read EEE capability register. Please confirm my assumption by applying your workaround and testing it with ethtool --show-eee lanX. It should be commented in the code with all kind of warnings: Don't move!!! We use one bug to workaround another bug!!! If PHYlib start scanning PHYs before this code is executed, then thing may break!! ... it is broken as hell.... -- 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 |