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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 90B86C10DC1 for ; Wed, 6 Dec 2023 18:58:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qIvS9+rESWySaVtj8otudFhssYdBbHO3rge80A+oGEo=; b=oriM044tqPEs5B ptBL3DxwAILRpqEcOC0920T2awo3DxqLbWWXd5WsaGRP2ukF0rrVoyqWTeLwQJ02S2wVkpokd2dSA /IYtLDWiukEDzvO8xil8RUeJQm8SNXADEJPaerGfCt5EtxVvUMyaMzrWft0XgvNeClvIcnmoVCO1k SKM5ysN46VUo8tiwRUOhxhmKH82zXt0vMqXsxzn/Fa3An7pTmDRp9PzPBpXq+MVyIY2e82zUqf0RV 1hAOIowqN++XySlTCp5dBLZXvdRXKKXwAVA755z8TIqkYM4L/W91o0X30v6mT49HlON3qbxvL0/BA Cm5Pc1HRJGjcQJtZi5yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAx65-00B5Xq-2r; Wed, 06 Dec 2023 18:58:13 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAx62-00B5Vo-0y; Wed, 06 Dec 2023 18:58:12 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 73A46E0007; Wed, 6 Dec 2023 18:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701889086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cUror6Zovej/o+q+rAuuqniKbeAQpbMhZQ2xAZRjM6U=; b=lHD4O3jig6uyxTqELk5Gy2q6UKohpFRsE0loQJ43ShLvd88HSx94xoiiTGs/uRgVUnSnez 8cu6VRs3Bc/VAkroGIkOkx9fbvzCIv3jcTqU8EFnghax0EsXMsAIMLJBqJh5548qct7nuP 0zGjX48NhCO/JSZdPX941pTH+Drg2G2PQT2NdNiuP6obdDMdnE/SCwyOoX8dugsFWoxEkW G6X86iVsJAQKLOh2dTdXXBf990JtCEf1J1ho8iqrHN4jzeQPQ69UtgJbEnUlYoDfub0nnD ErrJX/WnplCNXD/9Vmn6Bp9xQImfHXbO9aS7cI0YoUs4nSM9G8ESjvNBgeI5Tg== Date: Wed, 6 Dec 2023 19:58:02 +0100 From: Maxime Chevallier To: "Russell King (Oracle)" 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: <20231206195802.5d2562e7@device.home> In-Reply-To: References: <3cd8af5e44554c2db2d7898494ee813967206bd9.1701826319.git.daniel@makrotopia.org> <20231206105838.069ae288@device.home> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_105810_475118_15B41407 X-CRM114-Status: GOOD ( 14.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 6 Dec 2023 17:58:08 +0000 "Russell King (Oracle)" wrote: > 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. > Ah right that's true, it should be OK then. Thanks, Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel