Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1153248rdb; Wed, 6 Dec 2023 09:58:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8Eev7CYY0F1hin/Ffgg7kghedhLhG5Frb66zeiVfhjHklo0OFP6+847DT9pA1F9X0Y5Dz X-Received: by 2002:a17:902:868a:b0:1d1:d30a:17ba with SMTP id g10-20020a170902868a00b001d1d30a17bamr1135116plo.36.1701885528819; Wed, 06 Dec 2023 09:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701885528; cv=none; d=google.com; s=arc-20160816; b=nvirY4DR3tr7ym0/THot6XiNGSc7F5wCHI2ZJ6ZoppHRlGeINm/PP1YhkvlWt/pd0O ubc9xbJxlFq2uWuGVKyHkEsw37ZFI+/v3+tqKQPbDXsPkqF2hd7nlrRP5Qa7GgPgLSkh j1hRoq72tzCDDNkF41Etgn2pvMbnhbO1CngsVA281v7w15P8ReFISgdYcae9mw9Q9GPz Fl+i4YeqdXQcpXk0zYORG122HMQXO2OyX+LNdvCUcx1tzJxRGgwciYlEzkXFIteLn/H+ WigZU9lsc/SV7MfSYd8wRJd8yLpOCc4/JQzyl6D1kPDd5WcncesOFhK35jF6b+qcGVmX FnrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3ZZNNhGyoTwRHgS/bMWVfX3vw+ZZ4cEePiAqrrIcnwM=; fh=s5KrzaDcGTedcwqvQg+8v6oVBbfSfna1Gafk7bRpIw4=; b=WZ5UZ4PhQeo+xH85GW1o2sOeYiC9ZX+u+oEMtsB+bArtzlk3e5IeGTo3jXSAVUdzjF AMlGW1sitJ9PQGQsCeGdZZgy/rDneUhVyIdqMNz8S+dZsTrX+2YPNIV6xLSREDeqDYbV X7jC3ILRQbT6iP3UvRvLTqC/EX47P0o80n55LqPFTRjavdoQlBG0QCHKu+QhZbGM+0N2 1lQdcE9xawRvhtjtvCL+xETmjZpO0q4949JXmZOCEvlqLHqzgXTIgwNdyYCtpP/HfmDb 0iC/SC6QWAz7N+52WSDUnr8uekzaNXaSH5aM25lNjTQABWoYgbO74eDz5BLGSpUbJtH5 la0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=0HbX49In; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 21-20020a170902e9d500b001cf68d9d2b4si130637plk.554.2023.12.06.09.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 09:58:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=0HbX49In; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C640D8029234; Wed, 6 Dec 2023 09:58:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379772AbjLFR6Y (ORCPT + 99 others); Wed, 6 Dec 2023 12:58:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379053AbjLFR6W (ORCPT ); Wed, 6 Dec 2023 12:58:22 -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 1DFE2D42; Wed, 6 Dec 2023 09:58:29 -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=3ZZNNhGyoTwRHgS/bMWVfX3vw+ZZ4cEePiAqrrIcnwM=; b=0HbX49InVIrrypsWfM0ZmrDswH hUiEYIwZ/X0y6/g3n9MfR/Xe2G5AdEZwo+6WoFCG9muiQqjrdSwuIWlOmpA/dcAwSSIDNPabftXNo uUNE6oM3plQH/R0YwGvoVXykOm1A4uJeGpKeG2xQ6OpBt4v6vuNKuyUgCJLK2gEMd+nzY3h0O6rqU lVYOBys6d13VTBf1WTZRBZfPGgizzwR9LYBtitOMb3NgrraS95ziohm/QKnnBx5eXCTQ1NEWNAn6r jZStgPtTaO+kCOGSkHoMhAr3HpiHeQ3UkPTPRTIclBzQAngtVpzIr9Moie2tqITHv3pZ/w+4X8vqF 3QJptGVQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56612) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rAw9w-0000E0-0u; Wed, 06 Dec 2023 17:58:08 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rAw9w-0002uo-Va; Wed, 06 Dec 2023 17:58:08 +0000 Date: Wed, 6 Dec 2023 17:58:08 +0000 From: "Russell King (Oracle)" To: Maxime Chevallier Cc: Daniel Golle , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Lunn , Heiner Kallweit , Alexander Couzens , Qingfang Deng , SkyLake Huang , Philipp Zabel , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org Subject: Re: [RFC PATCH v2 5/8] net: pcs: add driver for MediaTek USXGMII PCS Message-ID: References: <3cd8af5e44554c2db2d7898494ee813967206bd9.1701826319.git.daniel@makrotopia.org> <20231206105838.069ae288@device.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206105838.069ae288@device.home> Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 09:58:46 -0800 (PST) On Wed, Dec 06, 2023 at 10:58:38AM +0100, Maxime Chevallier wrote: > On Wed, 6 Dec 2023 01:44:38 +0000 > Daniel Golle wrote: > > + /* Read USXGMII link status */ > > + state->link = FIELD_GET(RG_PCS_RX_LINK_STATUS, > > + mtk_r32(mpcs, RG_PCS_RX_STATUS0)); > > + > > + /* Continuously repeat re-configuration sequence until link comes up */ > > + if (!state->link) { > > + mtk_usxgmii_pcs_config(pcs, mpcs->neg_mode, > > + state->interface, NULL, false); > > + return; > > .pcs_get_state() isn't called only for link state polling,but also when querying > the link state from ethtool, from phylink_ethtool_ksettings_get(). > > As mtk_usxgmii_pcs_config triggers a pcs reset and reconfiguration, won't this disrupt > the link ? Highly likely if there's a race, but note that mtk_usxgmii_pcs_config() only gets called if the link is *down*. I guess some IPs need a bit of kicking to work properly. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!