Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1146819iol; Fri, 10 Jun 2022 00:58:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNPlKCHb7jI0slZK1UmQeZJJfHEYFGFDT9MoK9qYCs6EnDxuYhim/O2jC2BTwmHZphkgaz X-Received: by 2002:a05:6402:c8b:b0:42f:ac38:9c07 with SMTP id cm11-20020a0564020c8b00b0042fac389c07mr40789123edb.292.1654847894060; Fri, 10 Jun 2022 00:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654847894; cv=none; d=google.com; s=arc-20160816; b=tkY00LFgbYGtCIKzbYNWMWiDMlYg/PaPQMqnDNgqSkfYSjiPnD6XU3pk3JQlzaJHvb npqyWxjPLq1jeJEjG4NKVp8JLMFxgGC/LhU0/lwUMYtJWVLJjXIo7UzOWp+OJPyi/uNs fgsRTTzCWm5Tfe/V1YdAcHeRz92bNUroGhejNd6bHicm6FStLfCeaUY9s57oGzZM40Wo e6jN+xw3Y6QxxupsNGCcZnxad4vdMkciIhmv/4eJz/85PkZLF9865kKu9PDRy5UH3DBp VbE/5hrufzVwoDB3Nj5YaHvatCd9M1PKkq6ckoH6ipS1T/IeH2ky4Cnzml/OMSRG+OSP bNQQ== 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=7ehVVnHGNeCX8STqn/z69kwtCQzGXB+Z+xZvMBLoGV0=; b=m3CGj/yV+jBHxgR2xDSHOm9BYMxlATQJ+Mkvoy4i7k2a+h7KWD+IHtnGtZrH1SMbSw BTPV/tEu7A92mtRRvUI/pPHA+UUkscZ+o7GWusXji9pXuXYU9epUjFAcx5KVltwT+oM0 Ge2tCv4fm7t6ZGRZcATWYcKRpUyioH+x7mw/4fDKNHzhQpBTjIMjyY0iunv3dPzvvluH Fu3TSeIhoUcoQOr4SGPY+nig/tioI2TGlsvsZTzq5BulOazomfKa0poCBO1wFupCbCC5 93u3wQblxPEij1C6zo4lxxgYgJYV54QdwLSpF7G7XZX27yfULsI+R+r/AwfUU/4vah1v tLwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nL86lEnP; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a1709064d5000b006e4b4049463si5490370ejv.429.2022.06.10.00.57.48; Fri, 10 Jun 2022 00:58:14 -0700 (PDT) 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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nL86lEnP; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235631AbiFJHbc (ORCPT + 99 others); Fri, 10 Jun 2022 03:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244746AbiFJHba (ORCPT ); Fri, 10 Jun 2022 03:31:30 -0400 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 860B0193FD; Fri, 10 Jun 2022 00:31:29 -0700 (PDT) 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=7ehVVnHGNeCX8STqn/z69kwtCQzGXB+Z+xZvMBLoGV0=; b=nL86lEnP25nxC0q/9AYMxQQufI 6E/ykfudlRfKm08L712JdI5gUFi5e8MhHsIYXZTXLuCgSHiLOIVnU2UMZ3GmVzqrp+b6iYWNZSITi VIIAnTTc76krunIBP+857GXkdhzrTYli8RWzCawcAq03kmqK9/+ufu0rtGUHgiRUd08/FFhzHKFhB 3wLcLvXPQBgnvpqBNmL0ES6RyzDY0likckmumfQkFQfvtfoc7raVC+LEiptPxKpWX+dvcVsOh8WCK k4JqWmVK85+TjN+2h5MXVNQ9fCcY1p8oegaj5QNE70O9O5EWpektE2M4RoydHDf3IRSEtTLHT+whk MtY2Hlkg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:32814) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nzZ6x-0007EW-1V; Fri, 10 Jun 2022 08:31:15 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nzZ6s-0003V8-W6; Fri, 10 Jun 2022 08:31:11 +0100 Date: Fri, 10 Jun 2022 08:31:10 +0100 From: "Russell King (Oracle)" To: Ong Boon Leong Cc: Alexandre Torgue , Jose Abreu , Andrew Lunn , Heiner Kallweit , Paolo Abeni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Vladimir Oltean , Vivien Didelot , Florian Fainelli , Maxime Coquelin , Giuseppe Cavallaro , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Emilio Riva Subject: Re: [PATCH net-next v2 4/6] net: phylink: unset ovr_an_inband if fixed-link is selected Message-ID: References: <20220610032941.113690-1-boon.leong.ong@intel.com> <20220610032941.113690-5-boon.leong.ong@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220610032941.113690-5-boon.leong.ong@intel.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Fri, Jun 10, 2022 at 11:29:39AM +0800, Ong Boon Leong wrote: > If "fixed-link" DT or ACPI _DSD subnode is selected, it should take > precedence over the value of ovr_an_inband passed by MAC driver. > > Fixes: ab39385021d1 ("net: phylink: make phylink_parse_mode() support non-DT platform") > Tested-by: Emilio Riva > Signed-off-by: Ong Boon Leong > --- > drivers/net/phy/phylink.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c > index 066684b8091..566852815e0 100644 > --- a/drivers/net/phy/phylink.c > +++ b/drivers/net/phy/phylink.c > @@ -609,8 +609,10 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode) > const char *managed; > > dn = fwnode_get_named_child_node(fwnode, "fixed-link"); > - if (dn || fwnode_property_present(fwnode, "fixed-link")) > + if (dn || fwnode_property_present(fwnode, "fixed-link")) { > pl->cfg_link_an_mode = MLO_AN_FIXED; > + pl->config->ovr_an_inband = false; > + } ovr_an_inband was added to support "non-DT" platforms, and the only place it's set is stmmac. I don't see why you'd want a driver to always set this member, and then have phylink clear it - the driver should be setting it correctly itself, otherwise it becomes a "maybe override AN inband if certain conditions are met" flag inside phylink. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!