From patchwork Tue Mar 14 00:34:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 13173503 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 232BAC6FD19 for ; Tue, 14 Mar 2023 00:37:12 +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: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:In-Reply-To:References: List-Owner; bh=fgOfTghkaXLggUpC9R+/kkMvaG44YRDJ9O9mCksSsAI=; b=CTYuAcYs5pDz/T 6xNe4j5l0JjCk8vhmv1Cs5wuCLju3gYnSmdj1GhOEa4JgzIa/0yHaWNXkVTQw6ZoY1iejEslJAiVI FNy9B9WanGzpT00b3HxLusMYhGfnrl06j00N4S1o+aaocTvNVhtoE40OFpt/XRFjH+UWgmBI0I+Gl xAflOsVhw+EkzhZCzgIsuxR4jD507FGoyfQLjcm10dSlCPBvktlwxXjLlSrqEhwnRzVU7/TKqE1eU 3fZjp/cUXJTxp8tyv625nWLZMyn95XRJ5W84V1CRxKwtwhC27SEB3/NUOudRRTlUeaORPdHKduBh0 fB0cBBj9lQZ1crCPi74g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbseB-008Qqe-Sy; Tue, 14 Mar 2023 00:36:11 +0000 Received: from fudo.makrotopia.org ([2a07:2ec0:3002::71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbse7-008Qog-Gn; Tue, 14 Mar 2023 00:36:08 +0000 Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pbsdl-0005Ll-0T; Tue, 14 Mar 2023 01:35:45 +0100 Date: Tue, 14 Mar 2023 00:34:05 +0000 From: Daniel Golle To: devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Heiner Kallweit , Lorenzo Bianconi , Mark Lee , John Crispin , Felix Fietkau , AngeloGioacchino Del Regno , Matthias Brugger , DENG Qingfang , Landen Chao , Sean Wang , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , Vladimir Oltean Cc: =?iso-8859-1?q?Bj=F8rn?= Mork , Frank Wunderlich , Alexander Couzens Subject: [PATCH net 0/2] net: ethernet: mtk_eth_soc: minor SGMII fixes Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_173607_575846_07CFA389 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This small series brings two minor fixes for the SGMII unit found in MediaTek's router SoCs. The first patch resets the PCS internal state machine on major configuration changes, just like it is also done in MediaTek's SDK. The second patch makes sure we only write values and restart AN if actually needed, thus preventing unnesseray loss of an existing link in some cases. Both patches have previously been submitted as part of the series "net: ethernet: mtk_eth_soc: various enhancements" which grew a bit too big and it has correctly been criticized that some of the patches should rather go as fixes to net-next. This new series tries to address this. Daniel Golle (2): net: ethernet: mtk_eth_soc: reset PCS state net: ethernet: mtk_eth_soc: only write values if needed drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 +++ drivers/net/ethernet/mediatek/mtk_sgmii.c | 28 ++++++++++++--------- 2 files changed, 20 insertions(+), 12 deletions(-) base-commit: 512dd354718b98c60d4ff6017ff8c9f66c10d03f