From patchwork Tue Jul 18 09:09:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13316908 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13030E540 for ; Tue, 18 Jul 2023 09:16:12 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2048.outbound.protection.outlook.com [40.107.13.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E89F10C4; Tue, 18 Jul 2023 02:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7w8d05Pf1A7pN7lopUOrI32IVbK5DELLcf4RWK7GZLkN4j14FH0KFNTim6nkhlk9JcyMsCdpmzqgoFujNdTmuaNlpxvbvpwvGQ5LY0EN9AW/o/3mk6pXNspm+Rp/c9e6SMkZNsI7DwpzHHmKdcyoFyC6ea5bqbAefG+41bNUI7u+nqJLW9s3Jd2h3oaPRnMXE34Q+g0Ev50F5mODp4fXvAc+ox9oJQlJM/FXssv2zAlEGxBgx8dA4/Yi/aquwUO+vO75DoXyHNX7zQr82eSSTYrL8wLsh7+9m2zwwCWhDtoU1eDZFZg5AQm1Xwa8Ga3Ri2pVS1UTVFyhJrlGeMI8g== 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=X4mjbKivz+LL02DbYultiLe/mQihV1fCGeOOdCUq7W8=; b=B1TPPPj7Lyw1TERYkwcTKgOeIvJ0feCcs34jLNaVjS6uU+F9xZvwFmQnFa+cXnzHL+8T5LSQKmgya7FwbyHlX5cXrVYEvlhdwCgQ8CPn4sAfepdb5KO4mYW93TnDhU46nCExVEmJiTouNh+3WLBNxkThPXGFONDODgddFizHzvn4Pt00F7XkhSU+tXWOsTgV2OB6JwUqvx+aTR/vi3YQsyl1kswZiPGAkFwv41vnc3wveD6H8rzWY5oPV+ChzIoUhwY0I/oLy5jL7NHcPeApzA4i0pOuf5+hVovJJAw4NDPvU9PE+kXx04AAG5Z5SWtk9JMwfMiFCELN9s1k981OVw== 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=X4mjbKivz+LL02DbYultiLe/mQihV1fCGeOOdCUq7W8=; b=dQOk9tmB4/DAwUMeOR/tHsnAkhpnpgkYkJ6Wn3yEPNZFvlABM5BDXcfU+FDmWyxylZ5ZX3QZYFELtsplBulqJ0fzpvrrBmZ7LZ8aXvw0xQdsAdxgOmv1Ljp1yKyxx4GQypy+KhOgnelD6+evsLcnZ//mRx0FvqTJZ/zzP3/1xhA= 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:07 +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:07 +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 1/3] net: fec: remove the remaining code of rx copybreak Date: Tue, 18 Jul 2023 17:09:26 +0800 Message-Id: <20230718090928.2654347-2-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) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR04MB3139:EE_|AS8PR04MB7832:EE_ X-MS-Office365-Filtering-Correlation-Id: d716ef09-30e1-4050-a2bb-08db876f9e40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o2zBp8sJ6oY6Zr5ywN+Y2a3M7YicGh3+NVBgbrpSeby5SqXpYSe9G+RNUFGfmyuqldkdCjmHvXgBfJNW6MEHuRMPCFI5P0uEgh99BTqtFI4xGQb1g5v6K/V7z/DgFdwi4aPyOLTT1gSexRwM6gfFrDBgoJSCCPd//LfamDRYPLfi6T+lWgt8N+iOupHyBrb7Lpka9148Thy8mYZdJfamvXsqXC4nCjv6sbk5O53P5h5bnNjZhZvpkWsJ7BQ/BtPZFn1JMGgbhaaFgo9a0kDsi6oj4Yi3oLs3L0n0z2GGoUrfBK0Qu3zdyw7k1B9QhM4YQfkhf2dk7ybp9vtekL0CC4dm3by8X1TagIgqfqaTCCP6bFjbB1GBfkflAFDzujiGvt/z5jgZRXYEv4amWU6JvuVpYyEAbvr3pI2q15HMZCbPO641k2QWni6SlB+XfpZZhQxEIt4B8zswlrCiMTEVP89TwLXmWHKs59FFsy0yrKbEY/bYAzD0a7wI/4Q82KFvGHW2K+h9N7NlCS8AkBa6KicV0pzhJiKLLqwQ234eT4c5DNY6AtFhou8mG07ag6/5VcYMVvyjJOZBWLfJSLEdB09XpJEV2dGbE0ShJNACqfJUF6TqeKc0LhVFQiqcjqVd 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: dnzKrugysw8uc21sYRA3ZQQCWN9z/npCbbW7lrLylSL4neE6iwUzidWqE1/LgeH3nKJDk5tcybul7easwVpra1JhQ1jsRuRFTPSYszr4yJTPS3jDXeoUAYIrTzgn2hgxbddOCNRGhbqCt3s6HEgwav8BnrdnXXbe29pQrpj+40+YUTkLS1jzAHAG9PKM29DGC48rV/Z9FfQs8MVBQkdllY31hrll4Df/MPY8GwOE+aLs5uxfHfoGID9I1+2Nd6t7vaesgGdxXlkP9jyUk2AIZQ6/pQtpi8ObKSffTK4Aw6tZEoTtPyY4a90+H9TuzNTnU//5NAh5y3ZtEfJp61kwiddw6SrcQDcIRxplTspeODnPCIPfuDxt0daE58SIV8ONkxc2YQioJqj7M2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RCuFGLJu34GKmuWYsK9z7n+3tonAbqhvwCMjbsbRoLtN8Vkt7YGVuDTuSF6r3+GM/po/tkR+hcPOYKcO5nBvuR3tiA5xH4mZXTpi3sBDPMMzbLAyU X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d716ef09-30e1-4050-a2bb-08db876f9e40 X-MS-Exchange-CrossTenant-AuthSource: AM5PR04MB3139.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 09:16:07.1027 (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: oYyv6pnQIuA8V2vZuPSscP3X8VDZ84vWCyPmjKA6i67Giuyzsyaxv7pkuiJ4ywUqLG8Q/tKEHBNfGuqTU7rskA== 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 X-Patchwork-Delegate: kuba@kernel.org Since the commit 95698ff6177b ("net: fec: using page pool to manage RX buffers") has been applied, all the rx packets, no matter small packets or large packets are put directly into the kernel networking buffers. That is to say, the rx copybreak function has been removed since then, but the related code has not been completely cleaned up. So the purpose of this patch is to clean up the remaining related code of rx copybreak. Signed-off-by: Wei Fang --- drivers/net/ethernet/freescale/fec.h | 2 -- drivers/net/ethernet/freescale/fec_main.c | 43 ----------------------- 2 files changed, 45 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index e4b5ae4884d9..90de14975837 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -680,8 +680,6 @@ struct fec_enet_private { struct ethtool_eee eee; unsigned int clk_ref_rate; - u32 rx_copybreak; - /* ptp clock period in ns*/ unsigned int ptp_inc; diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 1063552980bc..d33bf7979430 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -327,8 +327,6 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); #define FEC_WOL_FLAG_ENABLE (0x1 << 1) #define FEC_WOL_FLAG_SLEEP_ON (0x1 << 2) -#define COPYBREAK_DEFAULT 256 - /* Max number of allowed TCP segments for software TSO */ #define FEC_MAX_TSO_SEGS 100 #define FEC_MAX_SKB_DESCS (FEC_MAX_TSO_SEGS * 2 + MAX_SKB_FRAGS) @@ -3065,44 +3063,6 @@ static int fec_enet_set_coalesce(struct net_device *ndev, return 0; } -static int fec_enet_get_tunable(struct net_device *netdev, - const struct ethtool_tunable *tuna, - void *data) -{ - struct fec_enet_private *fep = netdev_priv(netdev); - int ret = 0; - - switch (tuna->id) { - case ETHTOOL_RX_COPYBREAK: - *(u32 *)data = fep->rx_copybreak; - break; - default: - ret = -EINVAL; - break; - } - - return ret; -} - -static int fec_enet_set_tunable(struct net_device *netdev, - const struct ethtool_tunable *tuna, - const void *data) -{ - struct fec_enet_private *fep = netdev_priv(netdev); - int ret = 0; - - switch (tuna->id) { - case ETHTOOL_RX_COPYBREAK: - fep->rx_copybreak = *(u32 *)data; - break; - default: - ret = -EINVAL; - break; - } - - return ret; -} - /* LPI Sleep Ts count base on tx clk (clk_ref). * The lpi sleep cnt value = X us / (cycle_ns). */ @@ -3240,8 +3200,6 @@ static const struct ethtool_ops fec_enet_ethtool_ops = { .get_sset_count = fec_enet_get_sset_count, #endif .get_ts_info = fec_enet_get_ts_info, - .get_tunable = fec_enet_get_tunable, - .set_tunable = fec_enet_set_tunable, .get_wol = fec_enet_get_wol, .set_wol = fec_enet_set_wol, .get_eee = fec_enet_get_eee, @@ -4525,7 +4483,6 @@ fec_probe(struct platform_device *pdev) if (fep->bufdesc_ex && fep->ptp_clock) netdev_info(ndev, "registered PHC device %d\n", fep->dev_id); - fep->rx_copybreak = COPYBREAK_DEFAULT; INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work); pm_runtime_mark_last_busy(&pdev->dev); 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: 13316909 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1B20E540 for ; Tue, 18 Jul 2023 09:16:15 +0000 (UTC) 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) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: o8fza16xtDCWF5Q4W07H7cVQfeFyjlleDgLAfpUiZb3vl2fKSxK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Hw98V6I+FtHabzmq3YuYKkOra1o124G5w3Qb5NqQ8hkYZ/s9HymbEjCaXuGF6uP2IUFNU2qEcYwxmoWjoaybSr1GzkXYowTan4FS0PQFeMdXLZiGwr/CyKvPOS9cck8D+KZkfEBoY+x6G6iPHlu4rNLEn/fNimDmCiWhXzm+VdoWbPYRM1CRnZu7WILZIhwns/4IApUtGS/6VTr7DGue2i2RFfYSRHiLRbePhdPVwLqL9je3MaDYqhvePHhZ/0YdIsZ8p/shnMwG6vT8yPLrb2E7/HZ0f0qNoFP7Qg5ZNSwa/1ChpjY2xA58PmAaWAQlY47zMif2zwjgaMhDtrpb7aMf8b+gcTP9bjFimrdrNxFmm0R2FzgvCkSUKKqzNR/P+v8/7Xr/7397NTWY40AxU/7+CRgC9bNO/K/VKQg3n/+7bv+Dq+aYIHqxBk8NSuPp8koPpu2/r2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3464d16-2f6e-41dc-d3f2-08db876fa12a X-MS-Exchange-CrossTenant-AuthSource: AM5PR04MB3139.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 X-Patchwork-Delegate: kuba@kernel.org 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]; From patchwork Tue Jul 18 09:09:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13316910 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1681FF9EF for ; Tue, 18 Jul 2023 09:16:22 +0000 (UTC) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2056.outbound.protection.outlook.com [40.107.20.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B90A170C; Tue, 18 Jul 2023 02:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KBr/io35PfK7YZQ6f61HbtOiYTt8Zp5W91jvDpNtZcT8Qzy8OYA1D0bLuh4CQrdFRBwrPCykhopbR4zhoFV9MzuV9vC2tYFbVEhTPlzt593ZWEtqLjfx8ovp2/bnvTX7RquVOIcTXE1vFlnJJHAWlXGf4mmFlETktNpCL5ZktQiVLDMpZ33eM0f7FQGSRYIFPdyO2WwaLlGuwIELvA13RrkBxO+tTh5F9r7ttDRbU7oMQhdkjYGKcXJrvMSP2E98yqb5H1Ik+/qnI8ZvYeTkSU/QekseD1W7LVelYca+UKhWnJVG3GHKaX+ld02k3XgrtndE2taN3Biua7tfdIrbYw== 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=FdjPvDmrrrkh8MKW8ljC8+6JLWdRtzFzvR8Gt8Tluho=; b=KUrQ6r3qC4YiJze/1+f25GZ8nR5XEm7K8dkYxPKaXKKdmPtqA4PEiY5/hhlf3UZq/+on5l0UfSAVTBgIvYVRKNsWMVPKP/K4wIackUYuZD9AOypb6KnxR7NZNPGX48qwtsmd05lIXmLOHSMrr5mK8qUcr9WkgNil1CVZbyoRwLNQH9vf1RyKi5Bbax5gnk2p3ulwxgshY1VNn1++m5pxAoJU0fyk4SEbJpmjNjpLVEK5ODg+V5xa4ERrDcJW85EbMCdZVt5mUqHp93hvH/s938jMVfPzaeI60aizl5RDVNVuOZiBnZ3e0PGy02dwLac6t6Lho1cBmJCd8HIPBOPUKA== 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=FdjPvDmrrrkh8MKW8ljC8+6JLWdRtzFzvR8Gt8Tluho=; b=pCFLduPdnL4jS6ffHOuh9Y3LJBfSoKotyX9CLj0hZ3w9A5expV0DAQPIp7j4UcyFomRQAg5W2OFl+miX2D7Ngf4Vf0KTV4sA6if0/2urni9JnZbyBp8PRVONXekBnaiabQdPNJZAWigipvtdYP9PlNMGvPxPZz+/i0DBirSlxxo= 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:16 +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:16 +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 3/3] net: fec: remove unused members from struct fec_enet_private Date: Tue, 18 Jul 2023 17:09:28 +0800 Message-Id: <20230718090928.2654347-4-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) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR04MB3139:EE_|AS8PR04MB7832:EE_ X-MS-Office365-Filtering-Correlation-Id: b74448e0-e995-46f2-947d-08db876fa3c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rqQv/CxWRAdPaBzv7I0DkxWfaGvwVTyrJgD9gfOAduYkfRWYUdyoFuJhv93FdCECQCKAri0jDlLvw6QM4zHm4GHcBSvmOkX/7Qk1KxxGxMJdqESjZZVYRBek43q696X6EpzmnhYUMiRcSOfhTUnOgE/p+AAwrgnE7HG45xNpi103JCQumhf3OMrYL850F4yKdISJPQ6vktYzj/2Bx8dj3HrYOnryJJBRCwsFY8Bl72RCF5cYfCWNqBZBXmvwInmT45p5eKkufeJlVBX4k1NHHaTqBLysj0j5eGXqbadeO97yyY9e1VUfb1iiNP/2E936ZGF41/FAvf5e06nDp1rUeCBSSjOIEd3jlZPXxsHXZcUm7AX21JMX7Gq5KOurEnJq4m35lvQFJTVUspZ4dqxI2NbOMYTu2pFgrUj8/9bo0TS9ET0vuq17GklNoTpNs+fXzO/G54TbvVafmpEuh3yydvajduqltrUiI3bpzP1EbiEHf4sLP9HQjOEggUwYsD8y+V8e3oM3g5ngTmu3PT6SvwigRUlq0CjpvhDAi3CH+oER6HKotDMuSZ3Ge6y93Vg/m2PruuY/ePCJmhlkv5bRpOQ5fquX8njfnw7e3U8jJystDmU8bhhIiDhFBnJ8Zatj 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: nXJPgUiIJFgWWFMViML0brRE/9YmomNtwzdeckm0yISEUlTpRFLb9rEjgqXFgO5wMAq4uscon6tesYO63lTLWINN5p3jj37AXGsD4UBegR90jU7yprla+1FZDehwwT/euhh5Ipp4L4/urdlLLCY632uJAsWm6tMLtu7Br+roJ2F5UAtofCHvQI+ZzDbY8/277pvC6Ge+o048zwaaTd1RFMP2ONGr7L046pq0Lb670/xoNszyNsJ2BE1Lw9iAsB8t4iZeEHsGr6+a1+X3DEKy7igBwZW1a0caWwrpszkzndMJYGaDr+1trhBmM+5zn2VZ6bnHDD41F87e5B1qVz7sM98LzSdbUod7Gcwt9AHbYnYTLFUju5r+B+vN9hgFEAj2JZ8uSZmoZmt20Bc462o2u5/syjudx4KJDV1dNLZq2dSKeF2eMiTibwezxqqymQovZsE6lk2dTlDjo57/5bT0DaUgGcpxavjkTt7uA0aHssaff5jKlVd6o/yu14vtYIYofGuV8YzLz63t7Db95roAnjpicYGkBQUIls2XLGGA6FuoL3tOY5lXJ6bfJZXyZ9Yv1p+Oj6tVxtpOGkheRLI+owlYTJT3Pu1cuv0yv5X4ndOXMhuF5hOXDjiEQug4HTE3GjgyiaNbhqDk/pXNgHEBbopajyRIWQ3DOPs1eSZGuD7vEshqR7zCwLqE+qeDJ3Bf0LXCbGN3OIu0wPYXo/lJ8e10ekkCg4PfuBDuCqm9/fj5Gv4T7ZsVpdFRfgDE5BCkopI6YDN4HaVVZ8Euj1NJU1ohLzVcPbo88YWouuvTpYruGe6sI+8uhWX89AURwzPptkmWvZvATdSzBX50YrlKN/gBCMK3Iv+KUQBxMeI9kMP3SJf5gyti40E+ltB7a4EFRp0PJ5zespF9k4jk2WNnTohoRAJ+uFl5/4j1CQd4HW3VnHaetaO7Ck7XBLsrU0prb6Cw5uvetiy4lxN5EapfFeu343fGRduieHcccZngX09vkzjXLek3N9bYgjJN6dg50SihGr1334P9d5CTQXM3ke+PdyZadN7En5meZXD7XamfMB0C/RugBzaT60fLj6kDOUJAG9syRGnT7fm88O91sCz/Z+Ta5TOO7edn+Tbgyw90Sao9XnN25XlqTh3L4P3WDcLWK+EmryrMpsscJIelAx9s9cLRc/Vnzr3DOp/w4CHZBTwq7Hz51iCIcylK/E4tlW+28DjKjv0V7V198k6XFv1M0lRISbYMwOXwbIlt03zw78tnMViOBx9/nTvkMqGi1DC/RLWdE9YkjOSRWl3HEeF+DCvnuXUQuN/QH5H4PwcRaH6wxI1SZBu3i7fQe8i7UbBnviyuNSDaHBe6INi/Rff4Pom6p9PsFlMUMn0CarwZBEZ2m4mwFyUVoaFeVDmzstg6aWZjjB4+9h5UNlQQKsB7BcLTNY5WaS3253LYcQ7AUm56DuI3iP2tPWkxUocGpodbIPp1gYUTnzOydjtIvtKQP44IV0lC+ewk1rr7TxOEtZmfC4Vs3AfvkmucVwZysCKa3IHneF7kDj1ZteXIlPqzH5nlJI9NnvxGgOxc5u4Iu2HH51K5sglbnUTgB57P X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b74448e0-e995-46f2-947d-08db876fa3c1 X-MS-Exchange-CrossTenant-AuthSource: AM5PR04MB3139.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 09:16:16.4856 (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: l7hWWCM9CCUGeEpXMI942ptTNy3Q9ecK2ji6K6pbxTin3cx86+BEOrT+rcTuvJBkJGRn13SkYx48xXrMzW3Bkg== 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 X-Patchwork-Delegate: kuba@kernel.org Three members of struct fec_enet_private have not been used since they were first introduced into the FEC driver (commit 6605b730c061 ("FEC: Add time stamping code and a PTP hardware clock")). Namely, last_overflow_check, rx_hwtstamp_filter and base_incval. These unused members make the struct fec_enet_private a bit messy and might confuse the readers. There is no reason to keep them in the FEC driver any longer. Signed-off-by: Wei Fang --- drivers/net/ethernet/freescale/fec.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index 90de14975837..f35445bddc7a 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -652,12 +652,9 @@ struct fec_enet_private { struct ptp_clock *ptp_clock; struct ptp_clock_info ptp_caps; - unsigned long last_overflow_check; spinlock_t tmreg_lock; struct cyclecounter cc; struct timecounter tc; - int rx_hwtstamp_filter; - u32 base_incval; u32 cycle_speed; int hwts_rx_en; int hwts_tx_en;