Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3464316rwb; Fri, 9 Dec 2022 15:06:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf4sp0i4zKIUFKoPT5mm+sq5ph79oZC8iFWd/KjLkhgKYoySpZxNTNrWJLsKfI/T9x6aFLZd X-Received: by 2002:a17:902:f646:b0:185:441e:224a with SMTP id m6-20020a170902f64600b00185441e224amr7557763plg.69.1670627189159; Fri, 09 Dec 2022 15:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670627189; cv=none; d=google.com; s=arc-20160816; b=GF1poN7P+6peeomT1KSVpYvrgshDvdW8zy2I9Nx0IhxoPyt6SGBuPKyFxD4Xw/OB7J DwQfRh6B3Azfs1/AObp3qnssUz9w/uUf4CfWB0NEQDEGd/GzYYs+b+49slct6Vw68qPC 0JKk5VuYnTDWLhUWocTUe1U1sNzYWl0KewFMbLL4QeVeqnM1MlZqIdyQKfpbHVLsJXSB nqTBqNDfbDader1G01SjvieX9jyBBn4Q7CCit6Y1lNPEkvgtdsuLFbRm78PA4Y3LB3AH iYImpii9nF1QxbRBUKe96D+rEtznh9msUINNMEVwKsG3YIuymU+cYStNxflSCbqIKfYJ MobA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=Zu+X0wWblNWuSMZQH6lF+ORTq/EbVz0uqh9AM1U4qCw=; b=eNV7anW2ZkiH1r5M7yC3izT3x2mvKZBzoaIxA932aaOErdfv19N0Wz0nojGd4K9JSb jZEmqVSHX89xr7eCxRlydXV7TH+uj2jrs0VVAAe7kN1zvd8hY/luJgc7fm5bxBKB+Rzx W8V4Lxs1rqEMjiXKxpANkgSox7Rqy6zr3uC9DXmVyGYeToDbTpW9JeSRuXxGeW7juxIJ 0HWlH/HTSUS5tXR/4Mw+EnJ13VIF4IXUqAPo+MZJQCTkZE+R2mYuCHhoI1KTLiSqbyxU Aaj11hDJCzDGJZ/VQDk1umD6JHg/O7N/WadJd0Vo8erIgdc0D9kjbjo3iimhPSV64pyD C1yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=zXWENwvK; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z24-20020a63d018000000b004779bfce4ccsi2506890pgf.452.2022.12.09.15.06.18; Fri, 09 Dec 2022 15:06:29 -0800 (PST) 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; dkim=pass header.i=@microchip.com header.s=mchp header.b=zXWENwvK; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230007AbiLIWrs (ORCPT + 74 others); Fri, 9 Dec 2022 17:47:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbiLIWrW (ORCPT ); Fri, 9 Dec 2022 17:47:22 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 533761C12A; Fri, 9 Dec 2022 14:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670626042; x=1702162042; h=from:to:subject:date:message-id:in-reply-to:references: mime-version; bh=l7YBKmMzDz1O5Koq1YvREF/7MqTU5nkmnxEBATNyr3s=; b=zXWENwvKe+AaZCmmgO5cFca27no0p2e9STU1IIYln6Y0esS1ttIZ8QtU SSJLTuKazA+I1/XmUKr2gTjHB3y5nAPL//yAgxujAiP8kKtTUvW8ivrWx PCoAnOSzmW1niG9mlCQ2ejNI0ODRy7QtZbeBucAHS4uEC55MuGqLw26FG 3EQtQmye+YdTketwjv6qnyyee2u9Gdyk3PvOUr4zTUrpsihRd1eHY9peU PXqInpwBAYJn1/DgaZ4/B5MQpnxR25pmCKaCKis1H2N9Fz5FkVNZME3a2 qsO8B1iwMvdirH+ZuuVcE37jg8nuMKqkkpqKmNA8vvvHszoO13unOj/ve Q==; X-IronPort-AV: E=Sophos;i="5.96,232,1665471600"; d="scan'208";a="192458907" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Dec 2022 15:47:21 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Fri, 9 Dec 2022 15:47:20 -0700 Received: from AUS-LT-C33025.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 9 Dec 2022 15:47:19 -0700 From: Jerry Ray To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Paolo Abeni" , , , , , Jerry Ray Subject: [PATCH net-next v5 5/6] dsa: lan9303: Determine CPU port based on dsa_switch ptr Date: Fri, 9 Dec 2022 16:47:12 -0600 Message-ID: <20221209224713.19980-6-jerry.ray@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221209224713.19980-1-jerry.ray@microchip.com> References: <20221209224713.19980-1-jerry.ray@microchip.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 In preparing to move the adjust_link logic into the phylink_mac_link_up api, change the macro used to check for the cpu port. Signed-off-by: Jerry Ray --- drivers/net/dsa/lan9303-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index 694249aa1f19..1d22e4b74308 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -1064,7 +1064,11 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port, struct lan9303 *chip = ds->priv; int ctl; - if (!phy_is_pseudo_fixed_link(phydev)) + /* On this device, we are only interested in doing something here if + * this is the CPU port. All other ports are 10/100 phys using MDIO + * to control there link settings. + */ + if (!dsa_is_cpu_port(ds, port)) return; ctl = lan9303_phy_read(ds, port, MII_BMCR); -- 2.17.1