Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp531715rwd; Wed, 31 May 2023 01:38:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Lu456PulJfFOWvTPr9pDzc/hcoXppjVI0fu2gLlDxzWrckda3sD3Vsx8XhiraSoY5E3Q2 X-Received: by 2002:a17:90a:e645:b0:24e:201e:dcbd with SMTP id ep5-20020a17090ae64500b0024e201edcbdmr5298591pjb.21.1685522300542; Wed, 31 May 2023 01:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685522300; cv=none; d=google.com; s=arc-20160816; b=fnTxHtmXy8Hpt7mgVEaVb198NVm5EzHcM/AFX9CdVApled24LfYciJOuSxqNd02uvX frCKXBGE/24zT+agCX8tNN6ZdqwZVEqjVrxYXORnDLSGtizORm4jEqzl6Mhgwdu5w9d3 VCixarFnl9s3hhcPHfP0CAqlXxQou66DM2MHjt+T4vPB9a3HXDYwLHc5SAKkqn+mjqkD u/pFZX+9OUN/caAIbgptkRB30MLKwKC1VSdijEgJWHnT3F1DEcOb1ZWq3PZZacC7BZcJ 3J3iPCJNiusxGIQNZdcpKULwNjOnqFRap54M33sGAY1Z26G1D7VLef7bIPuv1g5yCIeN ykrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/CO3MjbxyKL7JQiyH07NNkNiHuYOd6LCCK+9KtMnhgc=; b=Y5sE+9Vdy81nemEsYTCzjKmHwUgNVzum25mHt8mpulVTayiu2A3gwRauSjq9l+UT4Y 5wJJNGZ93Pg3Ub2THJHMkSfytE5y6P2UPq3WOX9aELzHQ0p8u1vRdfN9ultFpQlJdbSK O0Nq2O8aVu/JmcpRmJOcW2RBn5Ms1xA5P0fcQQ1sAVZlocgP3dWX6/SG+d9MmwehEPQg MA03LF0WWc8Vno9Nos4oV5kgWrzLhW7lpfz01hVYNIqXPx4/c124Fv9s6zJXahFgxpL1 ps/Hz+P5cTQF7Ki/X8Q2o5UnPp+zIbZf0bzd9EwYgFrjLWAeFWU9/DpPn7cq6Ja128Uu HsFw== 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 h6-20020a170902ac8600b001a66c369e0fsi484747plr.510.2023.05.31.01.38.08; Wed, 31 May 2023 01:38:20 -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 S234626AbjEaIMi (ORCPT + 99 others); Wed, 31 May 2023 04:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232547AbjEaIMg (ORCPT ); Wed, 31 May 2023 04:12:36 -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 95D39BE for ; Wed, 31 May 2023 01:12:35 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4GwT-0006Bx-Ry; Wed, 31 May 2023 10:12:25 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1q4GwS-0043cp-Ad; Wed, 31 May 2023 10:12:24 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1q4GwR-00H83J-9T; Wed, 31 May 2023 10:12:23 +0200 Date: Wed, 31 May 2023 10:12:23 +0200 From: Oleksij Rempel To: Lukasz Majewski Cc: Andrew Lunn , Russell King , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] net: dsa: slave: Advertise correct EEE capabilities at slave PHY setup Message-ID: References: <20230530122621.2142192-1-lukma@denx.de> <32aa2c0f-e284-4c5e-ba13-a2ea7783c202@lunn.ch> <20230530154039.4552e08a@wsk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230530154039.4552e08a@wsk> 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Lukasz, On Tue, May 30, 2023 at 03:40:39PM +0200, Lukasz Majewski wrote: > Hi Andrew, > > > On Tue, May 30, 2023 at 02:26:21PM +0200, Lukasz Majewski wrote: > > > One can disable in device tree advertising of EEE capabilities of > > > PHY when 'eee-broken-100tx' property is present in DTS. > > > > > > With DSA switch it also may happen that one would need to disable > > > EEE due to some network issues. > > > > Is EEE actually broken in the MAC/PHY combination? > > > > Problem is that when I connect on this project some non-manageable > switches (which by default have EEE enabled), then I observe very rare > and sporadic link loss and reconnection. The interesting question is, do other link partner or local system is broken? In some cases, not proper tx-timer was triggering this kind of symptoms. And timer configuration may depend on the link speed. So, driver may be need to take care of this. > Disabling EEE solves the problem. > > > You should not be using this DT option for configuration. It is there > > because there is some hardware which is truly broken, and needs EEE > > turned off. > > Yes, I do think that the above sentence sums up my use case. As Andrew already described, current linux kernel EEE support is not in the best shape, it is hard to see the difference between broken HW and SW. > > If EEE does work, but you need to turn it off because of latency etc, > > then please use ethtool. > > > > Yes, correct - it is possible to disable the EEE with > > ethtool --set-eee lan2 eee off > > However, as I've stated in the mail, I cannot re-enable EEE once > disabled with: > > ethtool --set-eee lan2 eee on > > ethtool --show-eee lan2 > EEE Settings for lan2: > EEE status: not supported > > > As the capability register shows value of 0. Some PHYs indeed have this issues: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/micrel.c?h=v6.4-rc4#n1402 In case of your older kernel version, you will need to fake access to the EEE caps register. Regards, Oleksij