Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6819151rwl; Mon, 9 Jan 2023 13:33:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXunYicv4J6vrv/a2vCq9O8qmHYGY4Kca5Vs1pGsyYiIGZumCB+iwasF7GWiS2fpnDMzgjUP X-Received: by 2002:a05:6402:331:b0:48a:e829:76e2 with SMTP id q17-20020a056402033100b0048ae82976e2mr32628263edw.11.1673299981955; Mon, 09 Jan 2023 13:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673299981; cv=none; d=google.com; s=arc-20160816; b=tbu24KFKjm0zuxDEFN/6iGWUeMXx4AlTvf9jXPg/AHgywGIaKGXi0aP4H5UoQfx9S+ XXR0H+NrPqmuFohuwrPvxFGm0XJbUDZl7FnZU4TfKgVRnYJpHtjc6FSa4HRzn5WZVgD5 faG75rm6AumDdWXlQowkA0qsS6PwdIfpZZy0eYOseJdUKL/FQRpHwY8nPY2ealGmsBUJ PlSlZLOE6tBiTZTyHF0XcVZk/4dX/YC0C6huKWKwnvWor5CcsBhyemMuwYMNsIpSFkEf JuXdYHv6vdkxomO1fxr0g6kIohuFId5UhKznjUhIQFl3m3Z5yUR7FP0919bFQR3rt4ej 2Deg== 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=CWzF2ZPzrioi9xFt/8R7f0UK9kLlhSHbzWnHLpta1jY=; b=0RYmfOWPs4VqmEKD4KyIbTVqXZlzaQFrKXapl89MGGN/0KoZYyC+VHPY4UQjQJtJz6 /ARSQKpD2RQlECtZR3SgcHuI1+FDRBM3PQ2FvOc0gvyIUgPI7pFv+iWt9Rt4GD1AKTW4 aeEZG4fQleriWbyGrYtjCcT315JgQw2/5oC+/2KMJqQVkzcKx3HOUlM2HdrVv3YYdfKr rBr2je8vTIpNsPwS/xQ5nj6vfzdfrqhsk5xV6s7a3o5Fc5LaDp+f5ldFblq60nO9IbJs bFpUW1Iby50n+1dtn67JvymL3Pkqfovwb6EqRFOKhSmbDbbwPo0dRdhSNNPBM02B/GuU iUAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ULHb+Xzk; 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 f1-20020a056402194100b00499a7fcf50csi4252195edz.208.2023.01.09.13.32.49; Mon, 09 Jan 2023 13:33:01 -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=ULHb+Xzk; 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 S237951AbjAIVUG (ORCPT + 53 others); Mon, 9 Jan 2023 16:20:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237699AbjAIVT2 (ORCPT ); Mon, 9 Jan 2023 16:19:28 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E67EF01D; Mon, 9 Jan 2023 13:19:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1673299152; x=1704835152; h=from:to:subject:date:message-id:in-reply-to:references: mime-version; bh=J1yPTJ30ftyyvOnC2+2vUGnUMmEFmadFpDvwb82hEIM=; b=ULHb+XzkpAZU1iMyNq8LWdweTltsPOzE8qfHkTQV9VN+AyqN5DdpoeK7 9t0GcIv4G2LDODqvi0ITX2ZN0vMxHU8+6/e39YYVAffbhXYlp0ostjTTK 5TCZXv73oEJHkz7Nb7ASUBZYisvVEORCO4g7e3rBgIkg08/EWM6Ss2cUM LzWM0j+N/0f+1aPaYyMUczRpm5+pIMs2kjsqV9T99C8ol36CM/rpKGB4A IPsW/29hcGtmY82Qf0hgyOo+DQtrxu4B/8XQx9CDWrlWsv+IXIQ6+PVZs 7FizB767DuzqkXmjtOkp2QQ0m//zwl2jdvNth59qRF9P0UyEiNKpAFPB4 A==; X-IronPort-AV: E=Sophos;i="5.96,313,1665471600"; d="scan'208";a="131543916" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Jan 2023 14:19:11 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 9 Jan 2023 14:19:07 -0700 Received: from AUS-LT-C33025.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Mon, 9 Jan 2023 14:19:04 -0700 From: Jerry Ray To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Paolo Abeni" , Russell King , , , , Jerry Ray Subject: [PATCH net-next v6 5/6] dsa: lan9303: Port 0 is xMII port Date: Mon, 9 Jan 2023 15:18:48 -0600 Message-ID: <20230109211849.32530-6-jerry.ray@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230109211849.32530-1-jerry.ray@microchip.com> References: <20230109211849.32530-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. In phylink_mac_link_up, the phydev pointer passed in for the CPU port is NULL, so we can't keep using phy_is_pseudo_fixed_link(phydev). Signed-off-by: Jerry Ray --- v5->v6: Using port 0 to identify the xMII port on the LAN9303. --- 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 792ce6a26a6a..7be4c491e5d9 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -1063,7 +1063,11 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port, { int ctl; - if (!phy_is_pseudo_fixed_link(phydev)) + /* On this device, we are only interested in doing something here if + * this is an xMII port. All other ports are 10/100 phys using MDIO + * to control there link settings. + */ + if (port != 0) return; ctl = lan9303_phy_read(ds, port, MII_BMCR); -- 2.17.1