From patchwork Fri Jun 10 03:36:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ong Boon Leong X-Patchwork-Id: 12876387 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 3CDD7C43334 for ; Fri, 10 Jun 2022 03:44:54 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/hAT+kHzDjSQCWpVZBYqIF/UGVGqsHljlPDnBlUBjYw=; b=wILofHKLX38n68 CvYYQjJh/IkHwBvC496vAFBCAtA1dogsqYW63NMoiqli5M22Oa5AwtW5Vc2wV0l18Hwa8HX7AGaQU 11kWiULyggdZ/cSxUqHmP97J1Qr2mtVVSQUte6goFhlndv/wgkHtKrVUNhji6HCxtiz+w6vo1hEaj Y7LPwu3cZ9G0+w/NSew2vYocNdsy3oB57Otk9d/fkcEemWfVfJNdhCvQzN7ycXLHhSENC+whyXfBB OngkEu2fB6sivjFBK5Nj5ByYGuDKwpN3eItxFBgjseWKEJ/pnBCD0PquZWVAouDz/WI2vcc/xXrCv Fq0bCtZErD+XRXMy+zzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzVYA-005Uyz-8s; Fri, 10 Jun 2022 03:43:06 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzVWC-005TzB-5T for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 03:41:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654832464; x=1686368464; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VsECB4rGQ9AOMk/R4KLPANHo0BZNISsxKzENHkPxCnY=; b=DRgF9R+NYwkTy4d/chdQfMLKtuss4IuHnLSDghZ7G3UCcEtGcxD5l4Wl xEDBKZyLkDMX4Rm4e5cyeii3esWxR63z2Pm7pS5yeK5BunOyyUObmatDG RVGcipp96CkawHg11dKnyH4Ofv0ebhM9zcu3prPkk2VSQX+8lYZns7HV2 L176legQUS6il6Iu9Cy/xmx6mEufLUmreFaWuPjFv/AMsgeVpwiga1H/W zEidhBCieeyhc+yuLfCSOkIUgW2edL7VVqWyqRCNF6PXoR27KTEGLraeV 0b4HjkYV+8vr7Z26EQIDIxAVt7y46I6Jyu6vICQHqNwC7oKi93mRc4Qzk Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278305258" X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="278305258" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 20:41:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="827993991" Received: from p12hl98bong5.png.intel.com ([10.158.65.178]) by fmsmga006.fm.intel.com with ESMTP; 09 Jun 2022 20:40:59 -0700 From: Ong Boon Leong To: Alexandre Torgue , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , Paolo Abeni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Vladimir Oltean , Vivien Didelot , Florian Fainelli , Maxime Coquelin , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Emilio Riva , Ong Boon Leong Subject: [PATCH net-next v3 5/7] net: phylink: unset ovr_an_inband if fixed-link is selected Date: Fri, 10 Jun 2022 11:36:08 +0800 Message-Id: <20220610033610.114084-6-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610033610.114084-1-boon.leong.ong@intel.com> References: <20220610033610.114084-1-boon.leong.ong@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_204104_283332_F485933F X-CRM114-Status: GOOD ( 11.47 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; + } fwnode_handle_put(dn); if ((fwnode_property_read_string(fwnode, "managed", &managed) == 0 &&