Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3042769rdh; Mon, 27 Nov 2023 05:26:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2are9UxYWOlT6CBC4syDtbWiUtT48gZu8JFDg42WaRq4niR2C/JfMRqgXGZB8GAmYypKw X-Received: by 2002:a17:903:2304:b0:1cf:d934:bd8a with SMTP id d4-20020a170903230400b001cfd934bd8amr1463428plh.17.1701091578479; Mon, 27 Nov 2023 05:26:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701091578; cv=none; d=google.com; s=arc-20160816; b=NE9MtvbCxc50bqQ5jiFHaArlK5CiktChYbLEftsYUoKBa9M7vjTFpYK5H1YImF041k XBYhV1qvkLZ3MiPxzPFJ9YwboOjGo7VE4bEWNa6TYAZvKpGgR0MVhHrkMdoJQ6BLmW3t yFZeBV/rI41lAoXHYWkyGGJMfuUcj/ZfB5sib5Fxm9LFAdqFCU6EkNMxF1Imr2w6apk6 PDWl+gqLaneQjGFPdMtGqkcM8SqBAnMAGo0WWij09kO/vizNtrslyCG8VfHtnsSOfpnL DURQ9+azTHYxKDBnxVAnZTthWoC73kiwKn0LQY913R6S9TjYU+BRIiNpyGJyuYkGyAB1 MrHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id; bh=HENdsf22PAcqaHQ2Hb5rbUl+s8svCg/kEkZZaFrhVus=; fh=rj5vtfO2Pe0dXnmmOvBan6O5MXDHi3Euga3MaQ2dbts=; b=fHrFtmXoWVZbmgEhfpfngFN+R8sba8NcU9KiFzmYtqN6+UUnjOg9pP/W93EKbButfC 7QnkipWeR9WcHQKlf8Qql8F3QTJ3joB96AXv92a+DOPcOQvHAnjW2nnmsFZE1pAJFOcK oUxIAeU8ucUL6zrQ6gmuKPpgmUiRe/kikFwsv/p97VXw588PCevwZNS46ZjpWFiy7gIy TZQskzIoypwenYGipYPn/4gq4hvXaRP0iA/jvSflvjBZ25yBvCMmg8a48B1oqTuFUZnd /6gpAWU9wEFQL8vAF1oIrnmIqe/zg+bQr6l/kJuTkYucJCq8W0OaXPy2vXziGLcHInGq szew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id h18-20020a170902eed200b001cf8e0e43d3si9416322plb.174.2023.11.27.05.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:26:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 03D9880D5406; Mon, 27 Nov 2023 05:26:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232819AbjK0NZk convert rfc822-to-8bit (ORCPT + 99 others); Mon, 27 Nov 2023 08:25:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbjK0NZi (ORCPT ); Mon, 27 Nov 2023 08:25:38 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7344685 for ; Mon, 27 Nov 2023 05:25:45 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r7bbw-0001DE-Lv; Mon, 27 Nov 2023 14:25:16 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7bbt-00BxGz-0Y; Mon, 27 Nov 2023 14:25:13 +0100 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1r7bbs-000D9T-2y; Mon, 27 Nov 2023 14:25:12 +0100 Message-ID: <117dc1503ecd07448cc2e0b036b34a49f5e8c38e.camel@pengutronix.de> Subject: Re: [RFC PATCH 6/8] net: pcs: add driver for MediaTek USXGMII PCS From: Philipp Zabel To: 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 , Russell King , Alexander Couzens , 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 Date: Mon, 27 Nov 2023 14:25:12 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 05:26:16 -0800 (PST) On Do, 2023-11-09 at 21:51 +0000, Daniel Golle wrote: > Add driver for USXGMII PCS found in the MediaTek MT7988 SoC and supporting > USXGMII, 10GBase-R and 5GBase-R interface modes. In order to support > Cisco SGMII, 1000Base-X and 2500Base-X via the also present LynxI PCS > create a wrapped PCS taking care of the components shared between the > new USXGMII PCS and the legacy LynxI PCS. > > Signed-off-by: Daniel Golle > --- [...] > diff --git a/drivers/net/pcs/pcs-mtk-usxgmii.c b/drivers/net/pcs/pcs-mtk-usxgmii.c > new file mode 100644 > index 0000000000000..b3ca66c9df2a9 > --- /dev/null > +++ b/drivers/net/pcs/pcs-mtk-usxgmii.c > @@ -0,0 +1,688 @@ [...] > +static int mtk_sgmii_wrapper_init(struct mtk_usxgmii_pcs *mpcs) > +{ > + struct device_node *r = mpcs->dev->of_node, *np; [...] > + rstc = of_reset_control_get_shared(r, "sgmii"); > + Superfluous whitespace. > + if (IS_ERR(rstc)) > + return PTR_ERR(rstc); Here you correctly check rstc for errors ... [...] > + wp->reset = rstc; [...] > + > + if (IS_ERR(wp->reset)) > + return PTR_ERR(wp->reset); And here you check it again. The second check can be dropped. regards Philipp