From patchwork Tue Jul 18 09:09:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 121897 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1618024vqt; Tue, 18 Jul 2023 02:38:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlEL3afPXcHooWpeI8UwNb4kqcAQ/b3czKV4v/MU1W4sw818BDi23AYmk9u4mzaTPWcPGPlB X-Received: by 2002:a05:6512:3c9d:b0:4f8:710c:e2c7 with SMTP id h29-20020a0565123c9d00b004f8710ce2c7mr11782416lfv.33.1689673102090; Tue, 18 Jul 2023 02:38:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689673102; cv=pass; d=google.com; s=arc-20160816; b=WJ1UKqkQBbuO10EGvFGU7L9EO41xU1XVHkOo+R4bKrHCM55WYECRQ1vzPPUl7i8m7K 9QtgHecwV3Ck2b+8mJDcltXpVcw4ehlmR/Zpg0Vfg11Ubz3JOQhOSBtMrA9akaedV6BU sxagwRb4d/avDDhxs6UWzBciPcDC9pqK6aaCLIY9GijkM1Np2OLNaFxDT8A7lIaPnfIp f9yguwmq3/69STM0Dd5Bx5y5E6eLg8vIACOXASMtr5BTG6BnqWZSUBtdSl6YS1GudVqW x8dTGHfkV0/H4APsIjQVXxTIZuW7xWRTl6MOZfPe4Q9dYDtfW7b0uGMicx5tWdOUnIBH W1Sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wkkAU0pu2XbALYKjcy6Iq8HGhF6SpG5UNEx58ZjEiTQ=; fh=fjWBy7/0+LMOsV5GFfetDmENPF8DM6xG02s2LAJ+ajw=; b=Skgt5ZHsanmkFF871KxdK86QgmQeNGhyu7nsVk6SDE6oxMlyGDbidwfsnWLncQyyMI FsOAyXH470y3mL6utFTuoHC203ZKDx7O/LaZrSX0ecB9yx8fxTCm7YocQlfr2BxDj4Cs K4ufEOOnryla5a7uDaaytyLzJPIGJ93nv01KpRn6f3xrH/ESOWq7khCguykyvYwf7p3i pB3bKEz8TZT8a/JUnnaYddoMBp71C8OJf2kNm937Xqln6ZDTtyKqccW13ePlVPuqRdbN j/Z5z6nKmEBkJL9p7MsTm4ZQ6ekBAewWXsP3Ky0ixqQoJdEJh00wQhwrqHkl678GLBex fCpw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rtK5HGuS; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020aa7d3cc000000b0051e0ebb201fsi962172edr.118.2023.07.18.02.37.36; Tue, 18 Jul 2023 02:38:22 -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=@nxp.com header.s=selector2 header.b=rtK5HGuS; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231767AbjGRJQb (ORCPT + 99 others); Tue, 18 Jul 2023 05:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbjGRJQP (ORCPT ); Tue, 18 Jul 2023 05:16:15 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2053.outbound.protection.outlook.com [40.107.20.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 748D910E0; Tue, 18 Jul 2023 02:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TzQGFlE0YK7Kw8b12j13f5YWJjtCstIwBN0EWRW1ait+4Z1N8UCvZdn+ij9/zuz887+1PnverGGbUY+dl2lyHXxlal9lCtFiaVXJINFw/ljclObzoWel5z3ol8+bpDhPuNGJRJyTEw8wWbcFcAvckjnkW5d286u2gcPE2FHPGedjO07OIyGFlUaIwFpPj8RUf3qADw57qu1RPD93uJIXFvnXnLz1Rp3NpdFbqj9yngHRBsh5MJp5iuUWArWq1SCq6r4wLAdXoLlBt9Tit8MOxE+BWW3lfYjXI4erqTMXpfr73DjCC6rXVMmtYu0I6/AuQCr0iL9EbDtGNj7MBUPyuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wkkAU0pu2XbALYKjcy6Iq8HGhF6SpG5UNEx58ZjEiTQ=; b=mDYRUxGnhGnWQxfWpFIoud6ipDyfVOkK8MqTH8TJ1pKOJg3ZECRaLOROl5ydKh9IqUT8vy52Gk9BslHBHyKI1Ozi1Ktcj7N4FzpjpVbbHHAZhcKniLsQUfmS45PU+Eljtp871k/RdsUdcN2rJTTVJ3PpuaXLTj0jCwVN4MmfEZnl6wwYhs+ttd5gxFCqckpEiAzeYHl/XwjokiZ+VU/rdlnZsA2XYaaCwGY/rJPO+zEHEFWqJCy/45PGZa9xEz5/h7Q26HraFnb+x+hA1kwP3YLpEKJfCgtCVNL5Izlpq2em3FOFCH0E43Q0n2hFudlamT4JVPmMo6/w2gvB9GqJ4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wkkAU0pu2XbALYKjcy6Iq8HGhF6SpG5UNEx58ZjEiTQ=; b=rtK5HGuSRGVJ+diY+PReQysayjjUm7eYgVt0OfqYr6LOLQfhQ+YRRMYq+qUlmrfn+PFsUr0ZuiuZOC3ILGNknHzqit0n9hHmZh5ZT+8xizu9MbxbM4gbZFV3ZdQvrYG1mQPTIOQMd5sCAQuvdW/cksbrylEGPDtQofdX1BWP284= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM5PR04MB3139.eurprd04.prod.outlook.com (2603:10a6:206:8::20) by AS8PR04MB7832.eurprd04.prod.outlook.com (2603:10a6:20b:2af::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.33; Tue, 18 Jul 2023 09:16:12 +0000 Received: from AM5PR04MB3139.eurprd04.prod.outlook.com ([fe80::2468:a15e:aa9b:7f8e]) by AM5PR04MB3139.eurprd04.prod.outlook.com ([fe80::2468:a15e:aa9b:7f8e%4]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 09:16:12 +0000 From: Wei Fang To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, xiaoning.wang@nxp.com, shenwei.wang@nxp.com, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH net-next 2/3] net: fec: remove fec_set_mac_address() from fec_enet_init() Date: Tue, 18 Jul 2023 17:09:27 +0800 Message-Id: <20230718090928.2654347-3-wei.fang@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230718090928.2654347-1-wei.fang@nxp.com> References: <20230718090928.2654347-1-wei.fang@nxp.com> X-ClientProxiedBy: SI2PR01CA0034.apcprd01.prod.exchangelabs.com (2603:1096:4:192::9) To AM5PR04MB3139.eurprd04.prod.outlook.com (2603:10a6:206:8::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR04MB3139:EE_|AS8PR04MB7832:EE_ X-MS-Office365-Filtering-Correlation-Id: d3464d16-2f6e-41dc-d3f2-08db876fa12a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VfhXaUKikeHMlvWRKDigY29WWlJSc15b4u0n7vYyn1X2uSMEYrv2MRrAGX7i42zR884qAZxf7HaBKfAZH/otitcuUxBF80MvmmE8aVYApqLc8DskT5GGDpsQUQRql0cQvXgExCUAhnjNj6EkNFaQKS2VTXN6/8w1ZeTlHJyggOi5HlSrxELauTCd+zNIjqxPwRgG32YkffoEJetePjW2prPC0dkT2ATLv6ZA8V7ifkycueBsTZyKPmAEvOsRNkwUKrmvSDg15QvTaKAGz6hWegegwCp3DKj445t4zwDAeEDj4Agj0psDZqDK8yPLbomRSOr5N/T32P52t7P/V9bqmRMVlZ2MjLWUJmTTNhU8EBvn7uN8f7nQnShGM0JeuvABEq2JXWMgfLPiVe6ga9ZzyTbmEjf9WMuaut6uOWQZwzOfSxlaK4swDwye4ucozY2qFTzwub6WiDsjNYX63Va4KW/hWXN5URFfw7FXi92dAoY73Jqj0jYHLm8kF1TorUxG0Wa35efBKnVQsSTshjiwRU0LbVMy+wKia+vBAD1mQaFmQcmTkOExAZecMWWFr8RTUKfiRloVZI6PD0NEBAra4enZ0tTW7UCFQe23tBlLIISOVNWxXj9J2/tHtFAYnYys X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM5PR04MB3139.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(346002)(376002)(396003)(39860400002)(451199021)(66556008)(83380400001)(2616005)(41300700001)(5660300002)(36756003)(86362001)(44832011)(8676002)(8936002)(38350700002)(38100700002)(6666004)(6512007)(316002)(52116002)(6486002)(66476007)(66946007)(4326008)(478600001)(2906002)(186003)(6506007)(1076003)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: o8fza16xtDCWF5Q4W07H7cVQfeFyjlleDgLAfpUiZb3vl2fKSxKR7+3yl05aI4X0hAlxc9d8suZBcKYEv/R3RT903j0kvmWUqUaAoQDAy6lh1BlBR9P7qTlIl5NHGfYree9/sOpV2xpXcu6E6RdrFwBIu5vCb16rMTDmRB+NlW+R7frjl7B27mfssntSEAna/FCwkBwhuEqhKExFv6HDozrKV99peQcczsuHeltANOSHa8/DbWRlUkH8E7vFc7UmOPYoXtkqzKLkgHZoJ7Ok2pQS4HncxgACeKFFB0iAgAVd+FDtUiNZHuNh+Y4I+c9x14s37ZzklL5adfaOos5gmCTNfwZKqpU9izvOde0BnzkC0FsSKGkt7EkrVOnDbFYXNTH8exwX9xnLqoErtLhqBTIH2rhcypPxdvgu7ejAI9lcU8pRp0uFlJVdQ0hFEp+0i3CQ/NOrv5Y0jxUCT/VIEK3AoJZwK58PiDqpaSooos1fFnLpGOlgT8QwcqaBqwBVvyIcv2qsudMS7+0LINClIvpYccrmD98nikJPsbggVBxeu7xb7c16k89z0wap4eqHF4P/oUBXStdu/Vvg/EFfjb9mVQ1iepuhnB1sGaGv01F7c/1B0Tem9/8sJ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139.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 09:16:12.1163 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k6/ayd9cugIGdgj+xZjdwqnvnB7Ef1RkZP8buo4yDMARVsq+oYlRiuLN1prBpS8Ve3YfRmOyPAhGagFXQGB7xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7832 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771750662868143125 X-GMAIL-MSGID: 1771750662868143125 The fec_enet_init() is only invoked when the FEC driver probes, and the network device of FEC is not been brought up at this moment. So the fec_set_mac_address() does nothing and just returns zero when it is invoked in the fec_enet_init(). Actually, the MAC address is set into the hardware through fec_restart() which is also called in the fec_enet_init(). Signed-off-by: Wei Fang --- drivers/net/ethernet/freescale/fec_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index d33bf7979430..1a21cff019b0 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -4015,9 +4015,6 @@ static int fec_enet_init(struct net_device *ndev) if (ret) goto free_queue_mem; - /* make sure MAC we just acquired is programmed into the hw */ - fec_set_mac_address(ndev, NULL); - /* Set receive and transmit descriptor base. */ for (i = 0; i < fep->num_rx_queues; i++) { struct fec_enet_priv_rx_q *rxq = fep->rx_queue[i];