From patchwork Tue Sep 17 16:42:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13806347 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 C00DECAC58E for ; Tue, 17 Sep 2024 16:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type: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:In-Reply-To:References:List-Owner; bh=OKw+6S7SzqON/bK+GxEyJcna+fdmcTcNSLZYUOnesQI=; b=Qr2AT1OQmzGZUMKmzulJAixvYZ DLToiQvHZr62v7yZ+lzgVALdzcpreD1PNBhea+dzn68P7B2KyRt+Id4v8tqdkK822sAAnX3K6BvIM vjmSKob56bHJpzBN8ZnVQtKC633WOXb8wAqRrr53WwD4Kd8kahDwAEPauIPXTLYGS9vXqIM/runeL Is9ZSuU9rJYrlVoEHvA/DngjxRfrE8E32e+e089KfvkLUwYmUDvZBeRtpEOfNwEh1CtEHc1jDHK5g 5BeKYyeRcEIVFdm/XugAVc3KKSJQcwmykmw2IA/ZQkfg2oHNKZAk+4tjQYs/PQ5gmXPRrbFyxCOAQ nSQzChIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sqbIr-00000006X2S-1PTx; Tue, 17 Sep 2024 16:43:49 +0000 Received: from mail-db8eur05on20605.outbound.protection.outlook.com ([2a01:111:f400:7e1a::605] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sqbHl-00000006Wto-3Aaa for linux-arm-kernel@lists.infradead.org; Tue, 17 Sep 2024 16:42:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VNWkGa6EB3wyKntziDr6at9jQ1GO5KAOQkqSNTOCKnuePGOBX2NHjzGlNtdLmP2bdO1xf6zg97oyAFSej9vHuWt5YxV9ADFPSeQDdBNHep/TVayoIUtdZ96tOWDaA2dgbnSf5UwRrRuaWBV1dRIQjwrO/KaUuLrI0XLwguerFfL6qlQwKECOSnVByZDMaA1xlqNwcMuC/YjW2D0kIuPzl6QkJF4TAQ5tltLEC+Us0afxZr6GgbTcEkIDmnGci840DU5fsjkI6S8TlqKDyK8UbsFNpK7LHzC0wTYWVgacUm4YzmeC8z1nJ7eLnDPk/MiwcJztIncIFic0mrgIWVab0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=OKw+6S7SzqON/bK+GxEyJcna+fdmcTcNSLZYUOnesQI=; b=TM4I5o68GlFc44FDRQhm3kdOwGUlQTSzIkQ8phQPZ1MGEO5Qi0YmUG6g2K2EJO2o9rGY5S9cC6YlxApDRs+UjDs3fUu1FlR97hxt2xNpPGlwaDmo0eVeuOJh11zTau24NCSCPzqVh+S3wtRhAIdpp6EYQTA8CUqUicFIejq/9lXr7xnMuwI26C5rpFM9JScOiwtLIwuu+M/XmGAXJq52Whi6X3lPFkOLNGr5eSYz2ROswKpNlb1ZY/9HqNm8ajn7pnbIDAjTHmMuICC1g609qKUu40XzKVLbr2K/9htMKz7rOWOBPpL7O8cS2x2GmF7alvSKC/ZQrOePy9DQjBmmDQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OKw+6S7SzqON/bK+GxEyJcna+fdmcTcNSLZYUOnesQI=; b=TvUg1HVpr6f48zhmxb9XzfmQDr1Eu+KV9cY0l5/FwFzqLyaRV+VL2B55FYUsy1Oa4+P6495ZWb1CKuHR8UmC74IWTGWvrDmilddwjB77nWVpCzYch5tTxHtazp6HwAGoRgmJ9Wf0vwaYIBXs5dRfO4hWkjdFYArbyZTyxOLV4h5iLKTx3VvRPc+qEU8vjSM4O3As6q3Anm0/7P7zjzdkPAxcq3f5SZ8oOHar47+rDEUAD0AbGoSe/OvbZZe5GizulCjkPhmoRg/O0N2wSA0CAa9qwKFL7c30VXT69UtDhGlgpyGkvm1htNl6SwfOSokL7jJ8VbpOTZIfd7D5RIVWVQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by GVXPR04MB10633.eurprd04.prod.outlook.com (2603:10a6:150:225::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.23; Tue, 17 Sep 2024 16:42:33 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::21bf:975e:f24d:1612]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::21bf:975e:f24d:1612%3]) with mapi id 15.20.7939.022; Tue, 17 Sep 2024 16:42:33 +0000 From: Shenwei Wang To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin Cc: Alexandre Torgue , Jose Abreu , Wong Vee Khee , Ong Boon Leong , Chuah Kim Tatt , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-imx@nxp.com, Shenwei Wang Subject: [PATCH net] net: stmmac: dwmac4: extend timeout for VLAN Tag register busy bit check Date: Tue, 17 Sep 2024 11:42:06 -0500 Message-Id: <20240917164206.414714-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BY5PR16CA0031.namprd16.prod.outlook.com (2603:10b6:a03:1a0::44) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|GVXPR04MB10633:EE_ X-MS-Office365-Filtering-Correlation-Id: db4d92bd-cc18-4fcc-131a-08dcd737ba4b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?6hvGWaJDQ4W1KwMeXEWQ7kaUnutkmfz?= =?utf-8?q?Vda6RPHpc9tgPVNZUw1eo0b6l04R3XK9YRZHQPuB6lfbCyF4zQLKrcAhV86jF9RvT?= =?utf-8?q?1JAVE3L/xCTlVAkiLF/1wnu5vhB0nKowtXgSaiJExzr3gLOUX/wjMnpHhK2QMLmaR?= =?utf-8?q?sUWE4dODgn5YmNJUivIC26N/AmUKUb2EbGcarF9ZLMaKe+ho7qs6t6W77en3W3OUH?= =?utf-8?q?fSZGUdbEcV+RsOs/gjeSgfmLSL9pACjj1SnALQppyV+X++TmPhIXst1qTxDh0zizv?= =?utf-8?q?dVJGJqkY9qcdHUFQyTOwUniLaouNdm5o5BSlk11mJ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PoMxSKhghpkh?= =?utf-8?q?inLBP4p/IpyYVGCG8yZPcQIw8ZuiXGscLTz5sDpPeNJ9cZCyVggNl0io0bZ0maEeI?= =?utf-8?q?es48QFzDkA36w+K4Q0yGsDJ7MeKwziRXxeoq44QNydoPl1V1uw/WDNpsZSAJSadbC?= =?utf-8?q?AMA2DH+kM11/+pfll0X+1SqYi+VkK31lTA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?SJ6yRgjCwoU787hczkv//Vsbbwg3?= =?utf-8?q?O7ART32yX7K5YH5p4OzSkQaf81SpVwy7lwjnjNV9EQ2uAH/CN3bNcKLWryIhSde8H?= =?utf-8?q?QsyjvvxSCUWvJmShB6ZkXeCawB4npXJNypd7PrtpodOve/L/tIVg87CvUDzrnesJo?= =?utf-8?q?WBoPGCujPA7IvOpmk44/UWEhKG5/RM3En2VlihGLZc8jlsirjJwNKHyNpIsZNU74s?= =?utf-8?q?LzgKMtPD6Y1GuapCYHHWjY9uJ6fh5ejDsD8XVKPAJ7LzUVCWgiKbvh/gRyETjW9Eg?= =?utf-8?q?6I0FbtQwpgjbO+14KYeSC3aPcsP77atCGXYJI+QSFXxuR3w0v7R2n2InmOnINYQSF?= =?utf-8?q?6178xu8KKs5VYzVKarDdQWMzrCy3TVFk7jWdiEbeQgMQ0eXNFUlw0zVBmOAencCyU?= =?utf-8?q?wUiYd4HeY1ozXft1KVOJSIKfaPv2q9lUHWRwfbzIGi7S6swU5i/9hgetglGSHTufo?= =?utf-8?q?D0EX3r+MJ2PAAEUfOAhn7j2RY9shj6IR7Mg60vskOHvBTpgSQ7G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ii32i7tgeE7WkG?= =?utf-8?q?ovGQlXT2jh6bgCs+7k4sI+zqUwrK+JJSiVsNa+mEHeuzNYzNtQfS24coY9FLuz62X?= =?utf-8?q?59bgjoLhpDNjCseFzEm5ddRwOK2tpKd516apvCn/+oL08QHS5ch+dHNhxcu1GI2Jr?= =?utf-8?q?XUaPstaqQrbI?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: db4d92bd-cc18-4fcc-131a-08dcd737ba4b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2024 16:42:33.1595 (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: BTlOjNmO9ayg9cmbmJe3UPw1Vv60nD+1zrsyavdG3oFjm2Ev0dxyiAB6ktYpl99F888scrCHYy0WKzqvN3NHbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10633 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240917_094241_819277_CF06240B X-CRM114-Status: GOOD ( 13.83 ) 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 Increase the timeout for checking the busy bit of the VLAN Tag register from 10µs to 500ms. This change is necessary to accommodate scenarios where Energy Efficient Ethernet (EEE) is enabled. Overnight testing revealed that when EEE is active, the busy bit can remain set for up to approximately 300ms. The new 500ms timeout provides a safety margin. This modification does not impact normal success path, as the function typically returns within 1µs in non-EEE scenarios. The extended timeout only affects the failure path. Fixes: ed64639bc1e0 ("net: stmmac: Add support for VLAN Rx filtering") Signed-off-by: Shenwei Wang --- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index a1858f083eef..cd5e5434ac52 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -471,7 +471,7 @@ static int dwmac4_write_vlan_filter(struct net_device *dev, u8 index, u32 data) { void __iomem *ioaddr = (void __iomem *)dev->base_addr; - int i, timeout = 10; + int i, timeout = 500000; u32 val; if (index >= hw->num_vlan)