Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2617378ioo; Tue, 24 May 2022 01:57:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznK41MZxL5bnaPKq5BbQp20DOaDcXO4d/4x9B+42sC/0fuAHuh7xCl35H09BwAuuIiZpK6 X-Received: by 2002:a17:907:8688:b0:6fe:c083:75e1 with SMTP id qa8-20020a170907868800b006fec08375e1mr13208572ejc.734.1653382628628; Tue, 24 May 2022 01:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653382628; cv=none; d=google.com; s=arc-20160816; b=mdVXOoNI2sRn0+JtOCsgSHt8JGg3DnBPJNKHUY4ZnwwEZMM13T3SQ3C7Zp5e1S8c4L QxqBxUcxi4iX5tChwAmOH1LHcoMVJMbCvDkzJh3sYu4aUyNkLH0Ckk9FEi1ZpGxPLMt3 8FMNpGElDtex6GPjiThFxOzHrb81HuLtMl9QQCCwWVVTv+45vqxXFjAiGOjddI+cQ9HG VqJeoMi6rj2sg20ljpHsrbMbbQ99Y4Ekowqf6r0o5052QPtVBcJ527WAVG1MM9+SwN0W XOeskdqplWlqPFPvO35cdFlnitjqH4vZldfRQnHe0SE7MySQLHaK7JS2uefmz4ZSbirc cE+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Sb45dTrApxFaeFEfp/c5MUaXF8wbmHfKv5XN2SAovx0=; b=L1NPKiWZyJPQhECVIAHlJuves4LBJthiVwWREhBUHqBCWWD76lXSPpQrG3seMabjwi 4EzmlC5jcvr3OnKtGYYBytMtLRQ38LcqQC6kndXJCXPm13MeldFa3oYpN4Dhb1XsAzTc WYbxx9FdaLCJISqcOYNIFlu/SvGIi10XiakrFKk7gZwmUKrjiV2l4/d9VOvmIdf2ugPS +uaS4wadN2A11SNKyzWj986K99V7KFerBkmOlpKJs3DHgfYlen9uTBfiF9kvui/FjLue bko9XyPIXJ27f5NImfBYTXDv4fJnPalSkAy6y8Xl60ZxO+7Lqza0mgeHCPQuo+E9bMDq fMbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hqiBOUCL; 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=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm18-20020a170907949200b006fef080a3a4si5040097ejc.189.2022.05.24.01.56.42; Tue, 24 May 2022 01:57:08 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hqiBOUCL; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234902AbiEXG1L (ORCPT + 99 others); Tue, 24 May 2022 02:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230475AbiEXG06 (ORCPT ); Tue, 24 May 2022 02:26:58 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC4756D199; Mon, 23 May 2022 23:26:56 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 24O6Qj3g025449; Tue, 24 May 2022 01:26:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1653373605; bh=Sb45dTrApxFaeFEfp/c5MUaXF8wbmHfKv5XN2SAovx0=; h=From:To:CC:Subject:Date; b=hqiBOUCLI4dKt+jz6hysBr06tMpJM33QLUXk/8k/lgUgMNdx68kACGYHdWDjp5bZE woYjk8Go6lx4pA64UPZGfGZ2C+ohukriZejks0rijzhbzqGNnJ+6JaBtnXXNSjWYGD vwLHXB7JuOI3iScJz4Wt46taoqY2TbNzIyFGXLx8= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 24O6QjV1013216 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 May 2022 01:26:45 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 24 May 2022 01:26:44 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 24 May 2022 01:26:44 -0500 Received: from ula0492258.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 24O6Qe6r053215; Tue, 24 May 2022 01:26:41 -0500 From: Siddharth Vadapalli To: , , CC: , , , , , Siddharth Vadapalli Subject: [PATCH] net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create() Date: Tue, 24 May 2022 11:55:58 +0530 Message-ID: <20220524062558.19296-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 am65-cpsw-nuss driver incorrectly uses fwnode member of common ethernet device's "struct device_node" instead of using fwnode member of the port's "struct device_node" in phylink_create(). This results in all ports having the same phy data when there are multiple ports with their phy properties populated in their respective nodes rather than the common ethernet device node. Fix it here by using fwnode member of the port's node. Fixes: e8609e69470f ("net: ethernet: ti: am65-cpsw: Convert to PHYLINK") Signed-off-by: Siddharth Vadapalli --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 34197c67f8d9..77bdda97b2b0 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -1981,7 +1982,9 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common *common, u32 port_idx) phy_interface_set_rgmii(port->slave.phylink_config.supported_interfaces); - phylink = phylink_create(&port->slave.phylink_config, dev->fwnode, port->slave.phy_if, + phylink = phylink_create(&port->slave.phylink_config, + of_node_to_fwnode(port->slave.phy_node), + port->slave.phy_if, &am65_cpsw_phylink_mac_ops); if (IS_ERR(phylink)) return PTR_ERR(phylink); -- 2.36.0