Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1152298rdb; Wed, 6 Dec 2023 09:56:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvCxghLNLwa6xB9fLC2kXLpjFhNdbkFtN7hVyfCwnL7/Eg8hT5HBtf9Ssro/D6BUxQZsTY X-Received: by 2002:a17:90a:7088:b0:285:d6a2:3bf9 with SMTP id g8-20020a17090a708800b00285d6a23bf9mr1308269pjk.11.1701885417008; Wed, 06 Dec 2023 09:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701885416; cv=none; d=google.com; s=arc-20160816; b=aSbrSWI3EQNeXKphSWU1XTg+J5LQOvaIW2Pw+EtRswEmum3KwULQeB8SlEEMcGgHSv Ug0OBe/ZeF0jBHVRYe/Db3/HbYRiVwAl/KQTVO2oP7KrLKKs1SonMDr5WzhGoVsYhqSZ 1JVjXhAK72z89PHX6KExMMpFcTrNvdNR6H4hszsfDdUEC4gtwCfdrfFBg/cjFhFYr84E /jTVaVRC9tN5U0Z+UhgRewdcy8zPwdw9FdVv1MzFB1Q/pvl3bXQhGmSuA+f9W+LSpJIo 3aSfUEVQNueOUuDFIiXeJjmgnMYg5pxYFXDBWxA5vAdUM9mbrBCPMRkTC5eeYq0B+2Ak WDJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PKSBsZAZJfjo9et72d0mSM7YqoMxniSM0jUJH+gRhQM=; fh=kJcXMp4O4T0eOgyy/+VGeOLmnrmVyNT+X7mcHhSI3lc=; b=ZAADee2o++x83sA9BJ8sDCmh83i9/7Sea4551sbF1xyHs56VUGLvDHMg6Rnb4vHkNk d6DMe7w/fXkbQT4mH8AEdgkTpDjEIjfiIeSIqfB0swGx37pJ+6RgkQjOq/gNMz6KNyfd TiYmkF1sn26WjHQHajugK6W4sqjShHrtih/slZbkFhR8Nc1MnBFaEv1qjiix6ipvmGyd V1oywcjnBHu4pH+/jPfIZ/u1aMWPRP4GR2JVz0pd4dMxy7H69Db0pz9MBb7Q9KQVoAkm I4uxtcbxcuLrrPw+OzeNHaUkk3ysxJA3bKghIoyMUNeRbz40RMtxHRzJnMeaOtgoeDUT 39OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ZsX3DpsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id e89-20020a17090a6fe200b00280ca5f4ca5si193559pjk.113.2023.12.06.09.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 09:56:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ZsX3DpsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5BB0C801C023; Wed, 6 Dec 2023 09:56:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378944AbjLFR4d (ORCPT + 99 others); Wed, 6 Dec 2023 12:56:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbjLFR4b (ORCPT ); Wed, 6 Dec 2023 12:56:31 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5904BD53; Wed, 6 Dec 2023 09:56:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PKSBsZAZJfjo9et72d0mSM7YqoMxniSM0jUJH+gRhQM=; b=ZsX3DpsK1aSucSyC1aqbU4xygy N8wt7Ogr1sfm32PjJkPFRnQPSNYMX3CE8rwBxp3Rk+ixAED/33xJ6I3U1Dm/OlIHGIs9z+gMJ2w0W mrv2ctMvSzhTL4rQx7fxvWYlt9gs4pHnDrKa8B5K5m4RZ+ZGUnsSNPorJfmLsx2Yo4+6Y+HCRE9yo ITyW8z8FgroOvK1JsWNh01emWtxzxYT5wQhHtcRUXbtZEJf7MRctIN+kj4UF93xKSQ4f8Bs5Y7dr3 X8x0HACW5cfJaRQ/scLQxXzj8WUleRz4tUutzCMBnU06SwLKQVKWea+ToU9+nMD9GiBEUBGjO+z9Q ieYKAnlA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53542) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rAw88-0000DD-09; Wed, 06 Dec 2023 17:56:16 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rAw89-0002uf-PY; Wed, 06 Dec 2023 17:56:17 +0000 Date: Wed, 6 Dec 2023 17:56:17 +0000 From: "Russell King (Oracle)" To: Daniel Golle 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 5/8] net: pcs: add driver for MediaTek USXGMII PCS Message-ID: References: <3cd8af5e44554c2db2d7898494ee813967206bd9.1701826319.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3cd8af5e44554c2db2d7898494ee813967206bd9.1701826319.git.daniel@makrotopia.org> Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 06 Dec 2023 09:56:49 -0800 (PST) On Wed, Dec 06, 2023 at 01:44:38AM +0000, Daniel Golle wrote: > +struct phylink_pcs *mtk_usxgmii_select_pcs(struct device_node *np, phy_interface_t mode) > +{ > + struct platform_device *pdev; > + struct mtk_usxgmii_pcs *mpcs; > + > + if (!np) > + return NULL; > + > + if (!of_device_is_available(np)) > + return ERR_PTR(-ENODEV); > + > + if (!of_match_node(mtk_usxgmii_of_mtable, np)) > + return ERR_PTR(-EINVAL); > + > + pdev = of_find_device_by_node(np); > + if (!pdev || !platform_get_drvdata(pdev)) { > + if (pdev) > + put_device(&pdev->dev); > + return ERR_PTR(-EPROBE_DEFER); > + } > + > + mpcs = platform_get_drvdata(pdev); > + put_device(&pdev->dev); > + > + return &mpcs->pcs; > +} > +EXPORT_SYMBOL(mtk_usxgmii_select_pcs); All the same arguments apply here as per the lynxi driver. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!