From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF50AC43334 for ; Fri, 10 Jun 2022 07:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5D5i0J9I3PkUKqwzLe/EHDzCixTMqEdlOsdCIbStVjk=; b=F11GzTntjs8abt I6zrHKybAs+C8sqfOJ72hsgkxg3aS6cDO5M39EU3aVtinVUXLk8iqBi99V1UxuKktBjyD0dOt0ksU gWtTY61MtnQurD6zj0Fh9bUEUsjqwb2yzyQLDn4KWVZGJx6DnXB0AKfRS2SRu0+AekkO4B0K90cFr MFqB24ta1nWP4qD16pul2f70MAYFPoeYzHKwwecjhdNADwisiKswl7+FiS+EwPSYd8nU/4KrAHu4K 2Il4LPOS0SJxm47bFiTyLwES/BiGHT0/iJJcNXPB5401FnyfdWEkKdK205UJaWsdIPVYaWyOBjYZU Wvwgtgvxe8Ay9GbPhK5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzZ7F-006RHQ-SX; Fri, 10 Jun 2022 07:31:33 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzZ7C-006RGg-P2 for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 07:31:32 +0000 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-Disposition: inline In-Reply-To: <20220610032941.113690-5-boon.leong.ong@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_003130_851821_D291A780 X-CRM114-Status: GOOD ( 18.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9F51C43334 for ; Fri, 10 Jun 2022 07:31:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346770AbiFJHbc (ORCPT ); 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) 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!