Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp739287rwn; Thu, 15 Sep 2022 05:57:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR4d+4oN6spcJbdEVnBEIGbzrJ0r/sKHs/y5INoUIb17J1gZaGD/pHkAMPCLU7Kt14bLJxyY X-Received: by 2002:aa7:dd0a:0:b0:44e:a27b:fec with SMTP id i10-20020aa7dd0a000000b0044ea27b0fecmr33609736edv.168.1663246677234; Thu, 15 Sep 2022 05:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663246677; cv=none; d=google.com; s=arc-20160816; b=0J4vXmSaXBsHp3zOVbF3Ti1iUOTi/VtdpAcDIfE/IbMJww8xLNK3w+rIx97k4aXAXZ xW0LqALGT65LhJgbk9TXLo3mInjT0KXOJhMhwQn0VCfBRREKTPjQgCJvDyDBjImdX04A tSHyEBfJCiINLB9vBodPsUqIAWEi18eGPYf7gb30lVX7mQJ1KAAglsYLVT/uY7FA7Hz/ /0fQKOvzzAo+0VQAltBySG7e7kwpIVs9uhBsUYxgRAEhTWLALZeiYqmQaunRzCXNEtNl lxfdYGyq55bNjo8EqgP1WH5XJnAwwjkygjdTi8UaA3cdjkcQFS2qLkLP4f5saDJ37UHb olRg== 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:dkim-signature; bh=I3ZAy4aja56eP0j0nEZoT9Ay84KDfaJyzdgAhvllAHM=; b=gL4+3N1m1o/4Gy0ZpotlcyX0OWmU9+IjF/7sGgxxlg2VWmWXC0zrz6wegh2L/sqoKE K1ZNNNCson9MU7YDG7odW1p5SMTD8O9/L8My9oztiBkwjmi5fX8K8t4KhLJ/4h76KADg /lI7vlkQk4w/t/bhaQaNH88SxT55D+xxDYF86jRflpUwwDDwS8lQvK+yf7q8GDyDm2CB znRfp37/ck8MmuWDBk/13nRAeuQeh/t1vIsN+SVelmkcwv9EBv56NQrbgBTyv5hY80fl ZqVFJ4m/Zjc16uCCJswKiXYJGPJ6t6Bghlm6yiK7GA2SJYaL1etCavF4o7l2vTRcUEb7 Pcvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=VkAOkLrV; 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 gb30-20020a170907961e00b007765c1da9cbsi18770750ejc.719.2022.09.15.05.57.31; Thu, 15 Sep 2022 05:57:57 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=VkAOkLrV; 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 S229608AbiIOMbN (ORCPT + 99 others); Thu, 15 Sep 2022 08:31:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbiIOMbL (ORCPT ); Thu, 15 Sep 2022 08:31:11 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D763867145; Thu, 15 Sep 2022 05:31:07 -0700 (PDT) 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=I3ZAy4aja56eP0j0nEZoT9Ay84KDfaJyzdgAhvllAHM=; b=VkAOkLrV7evLiiuzNEH4hxRYA4 vdL5ZAvpajdNldEnXqkhRVW3Lb2XV5swN0nTSSA4/EqPb/FGI+BnnJCAoUTWxtfLp0r/XG/mPx0Hb ibvk/eWWiXEK2tStMrpKk9UQ+zCHBYWttoPfY7k4VC2YpNuDWIJgl1gSHo35LI11+q4I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oYo0y-00GowF-9i; Thu, 15 Sep 2022 14:30:44 +0200 Date: Thu, 15 Sep 2022 14:30:44 +0200 From: Andrew Lunn To: Choong Yong Liang Cc: "David S . Miller" , Heiner Kallweit , Russell King , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Dan Murphy , Song Yoong Siang , Cacho Gerome , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 1/1] net: phy: dp83867: perform phy reset after modifying auto-neg setting Message-ID: References: <20220915090258.2154767-1-yong.liang.choong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220915090258.2154767-1-yong.liang.choong@linux.intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Thu, Sep 15, 2022 at 05:02:58AM -0400, Choong Yong Liang wrote: > From: Song Yoong Siang > > In the case where TI DP83867 is connected back-to-back with another TI > DP83867, SEEDs match will occurs when advertised link speed is changed from > 100 Mbps to 1 Gbps, which causing Master/Slave resolution fails and restart > of the auto-negotiation. As a result, TI DP83867 copper auto-negotiation > completion will takes up to 15 minutes. 802.3 seems to indicate that if the seeds match, it should immediately generate a new random seed and try the master/slave selection again. So you seem to be saying this part is broken. > To resolve the issue, this patch implemented phy reset (software restart > which perform a full reset, but not including registers) immediately after > modifying auto-negotiation setting. By applying reset to the phy, it would > also reset the lfsr which would increase the probability of SEEDS being > different and help in Master/Slave resolution. So this just increases the likelihood of different seed values. The 15 minute wait could still happen. The link peer seed value should be accessible via the autoneg page registers. Can the local seed value be determined? Linux can then detect that the same seed is being used and give the PHY a kick to pick a new seed. Is there anything useful in register 10 bit, 15? So long as you don't use interrupts, phylib is going to poll the PHY once per second. It seems like you can get a better workaround by using that polling to check if the PHY as got stuck, and give it a kick. Andrew