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: 6568 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1486311wrd; Mon, 13 Mar 2023 17:41:17 -0700 (PDT) X-Google-Smtp-Source: AK7set8ow7CJ9fgIsSHF0i+JYMFkwEbEbrQmE3M2c/zGLV51bnqovclU62TrAQHEJ9PABnVVfHag X-Received: by 2002:a05:6102:3f55:b0:421:c588:4d40 with SMTP id l21-20020a0561023f5500b00421c5884d40mr24766570vsv.15.1678754477649; Mon, 13 Mar 2023 17:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678754477; cv=none; d=google.com; s=arc-20160816; b=S4OfHteDPR4jzQhXQ4ULFwy98CagNHeU/jhEmBVVE8J0C19cXIFarUBpBy4DFSi8/F NpOW/nzgGM6lp31/NdpTdSF2n8Msz3MnFxDfH3w26lSbLErToknPdIq4haqzqPLZaRV8 TNC1FLBM8Af56GlkKAI10pTlt0ITNSLi0r760ApHYJX8WAoB+7THMj/eYLUe5OiUA36m J3gUQ7pyiJec4p6MlGiazbEBHmyUp1Ymz1aNlcvI3W19cKuGfcV2xpgWJDarftSToyys Wvb19e5GnVAnwPsjqvQIaT/OTR6Wu+t3FUxgbDDcKIZfbLNv24JPnHQvVPz0LltPeuhy +arg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=AaGEegH7rRcetmtGc/yZk+8R1wa4adiaQvnD7B5+y2Q=; b=Xs0R4U87KtxzqL8CCk81Ako6v3nFI4L2G+6oUQA2ysG77sHK7lz18RHEey/C1i58Gc iCU2CYsLgo0IpRDRxlJQkSlkettP0mBUyyCMzyjavmLyEsi4V6ZENKsRmCwO6fcj27JJ 0HTK2CSzBmuc9waIvtSDR6DFboW2wiUhBG7FuObsl6kFbQlqYRlR+HRQpCacXDWfGgHT VwzvMTw0MzIdPkiY5sbRAz+JChSzGzL0xDZwld+Xqa2IC4pXWVdFssJADV77q6b6wzSo y6xQfv3elfWNO840JnkMxZhne9MJW4+d/87LemkaVb9S01a688cBCKCelKbbPAx1SIsG YcnQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a67df84000000b00423eb44aecdsi374114vsk.433.2023.03.13.17.41.02; Mon, 13 Mar 2023 17:41:17 -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 S229953AbjCNAgC (ORCPT + 99 others); Mon, 13 Mar 2023 20:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjCNAgA (ORCPT ); Mon, 13 Mar 2023 20:36:00 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0940E65134; Mon, 13 Mar 2023 17:35:54 -0700 (PDT) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760301655472766766?= X-GMAIL-MSGID: =?utf-8?q?1760301655472766766?= 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