Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1218303rdb; Wed, 6 Dec 2023 11:53:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGow6mDvnV54Wmy98G53bk6ALBMSZ/SR3AL621LtM9SDJWDVsDRYBpFk/1SNcqyCFjoG3gp X-Received: by 2002:a05:6a20:734c:b0:187:e3e8:e8d4 with SMTP id v12-20020a056a20734c00b00187e3e8e8d4mr1926355pzc.53.1701892383065; Wed, 06 Dec 2023 11:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701892383; cv=none; d=google.com; s=arc-20160816; b=sz6HITN0GMqNkt4og/k5/MOusj6x0kWAL4ErlhDdl1JIjhqSkPSzXPTEu6Qv8eDidO PfVbWn+I1D549TWxqGBFDK+o1GoJnUsxlsdUwMW1ntr9jMWXsPrylSETm60cAIFoG05V aiuMXnPcPdaOKmTMbl2l4V8f7Uhd4lkOC1RmyRPRNclHH2OorMhDsNYuqU8kbkHVEE88 3wQ+RvDr1M7kSt0lmNGXy/6UT4fyCWee/JWVfrxspPnNK6IDg13lOhp7LHGgNwHGEVQs xVB3ElkxyDmB6vi/BPrHQnUywffJjri+YkQ5BHPx/WS3RkylYkKMgQJrsOTRxTTsUp9g hC3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qmfYsC4VkfU8W04M7skBNxbqvp+vndqxS7lpBsH3A3A=; fh=uY+7ONsNykR7xnB1nTQcaVQTLmIvLm97L6svsWS9qxw=; b=0/F/tDuQyxJhc2SXvUj1F7T/6qFJ+PHKMliEo5psNRmyyLCOm49FziuGRUJJllNGvt XPd8WDjb34eYqBqnDaLE2TJh7s90J9t+KUz0kaQzFHoOUV3OBDimR9t1F79M2yccGHTv QkVECNiA1peaZEoATEv+2yA0bnpVV6Olg6ljt7nhmP/BSVAsAsxFrv18TDkKTd/qEA99 ywLWU95BZB5vF3kZO4gxIsVkSRFhDEuW3A7F73a3TOy8LmwPmENv4LqaZcd1LydKZGdQ +5M5YnmNzIjNV897HqV+SVcQxSVzidOs2CFEm8fcDRrscnAFku0ENPASqA2tOrX85vCP Hm3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id x3-20020a056a000bc300b006ce7e551b5csi397764pfu.402.2023.12.06.11.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 11:53:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 9689380C8437; Wed, 6 Dec 2023 11:53:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442820AbjLFTwo (ORCPT + 99 others); Wed, 6 Dec 2023 14:52:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379426AbjLFTwo (ORCPT ); Wed, 6 Dec 2023 14:52:44 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE74FA; Wed, 6 Dec 2023 11:52:49 -0800 (PST) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rAxwa-0007c0-2h; Wed, 06 Dec 2023 19:52:30 +0000 Date: Wed, 6 Dec 2023 19:52:23 +0000 From: Daniel Golle To: "Russell King (Oracle)" Cc: "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 8/8] net: ethernet: mtk_eth_soc: add paths and SerDes modes for MT7988 Message-ID: References: <3ccc33fa14310ab47e90ff8e6ce46f1562bb838e.1701826319.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 06 Dec 2023 11:53:00 -0800 (PST) On Wed, Dec 06, 2023 at 06:55:50PM +0000, Russell King (Oracle) wrote: > On Wed, Dec 06, 2023 at 01:45:17AM +0000, Daniel Golle wrote: > > @@ -516,6 +538,21 @@ static struct phylink_pcs *mtk_mac_select_pcs(struct phylink_config *config, > > struct mtk_eth *eth = mac->hw; > > unsigned int sid; > > > > + if (mtk_is_netsys_v3_or_greater(eth)) { > > + switch (interface) { > > + case PHY_INTERFACE_MODE_1000BASEX: > > + case PHY_INTERFACE_MODE_2500BASEX: > > + case PHY_INTERFACE_MODE_SGMII: > > + return mtk_pcs_lynxi_select_pcs(mac->sgmii_pcs_of_node, interface); > > + case PHY_INTERFACE_MODE_5GBASER: > > + case PHY_INTERFACE_MODE_10GBASER: > > + case PHY_INTERFACE_MODE_USXGMII: > > + return mtk_usxgmii_select_pcs(mac->usxgmii_pcs_of_node, interface); > > From what I can see, neither of these two "select_pcs" methods that > you're calling makes any use of the "interface" you pass to them. > I'm not sure what they _could_ do with it either, given that what > you're effectively doing here is getting the phylink_pcs structure from > the driver, and each one only has a single phylink_pcs. Yes, you are right, the interface parameter isn't used, I will drop it from both mtk_*_select_pcs() prototypes. In the long run we may want something like struct phylink_pcs *of_pcs_get(struct device_node *np, phy_interface_t interface) provided by a to-be-built drivers/net/pcs/core.c...