From patchwork Tue Nov 28 08:25:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lin X-Patchwork-Id: 748491 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Dq8fdjEH" Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2054.outbound.protection.outlook.com [40.107.14.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0295391; Tue, 28 Nov 2023 00:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bu4EAMEuhQ38wqWNZ/WJyCEBFqM0CVnmlVzdwKAkNKwje5mkCEfp8Uo2J1ZMKxhYlTsSW1lWUym2B18Pqgd+kLkDOTHE63133byWIu9hPQHGcsjLVWTlBb148rNpu5G/Fol4cJLXzL4rrwvjZ3x8q7/uMKisp+B9pdgJB5/A3qavZPvSCcZukycOEWJzkapgExIhXNVpW9SztWf0lcDZWV2M/G4/iwOBBcgJ3zEY8hELakPniW0nNX/3xfJ0NKPnDFVAZjMXLLkUkWtq1XC57jgzH1iMeUAKvvtXR8oMe6cHp8DymHZFJ2YBgNbasOeuDFzP0N3+f/fWI1LrJxnt5Q== 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=JTJlh2esIs0J3zdwZT62A3siivnz7gZnEojPswGLlvk=; b=LeWTHjlpLgLJcAQBhd6W0n2xxAvEqP3yE1aP8N4ok7FCcXBxcSw/B+Z4MTIf/PgCeMkP8sDNkYOaNFowSHzgLXHoW1+WSiZ3wmPuJwr8nWVRQCVR055nNWbv+S1WI5+npS4OmUtsi2aOsJQ1h6B1s/CYVrG+B3ibm9o6vFAYNnlkudWOrceQUsFOxbx5J8hAy9hQu2bffWUJGUrp3WQxR1pofl/OGJqKLcqH+CROcqDm7WRyH3HJ4pKXptaCrj7gxZ0JhPru+nsag0U4T6bjmDMBGTESbIP6DEM148i8qOFKRnQPMjgUQd4YXpv8cJmgdhjDXzx6+gCgwOfkyl7TEA== 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=JTJlh2esIs0J3zdwZT62A3siivnz7gZnEojPswGLlvk=; b=Dq8fdjEHrpN8TaVkPEPt8pkzhAZB24pKOQ4KBT6prMmwL7Svj92nvGjciAsullkSNn/snqYd1A1XxnmA4xEQDFzUk2inG2cq10Q0h4q/kRwaWodaK/wgyKO1OVIE7uqE7Pm873Z9NxwhFTx1oCbT+PZyfeTEhxkelOQFwul5lNg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PA4PR04MB9638.eurprd04.prod.outlook.com (2603:10a6:102:273::20) by PAXPR04MB8653.eurprd04.prod.outlook.com (2603:10a6:102:21c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.22; Tue, 28 Nov 2023 08:26:47 +0000 Received: from PA4PR04MB9638.eurprd04.prod.outlook.com ([fe80::34dd:289e:9e8b:9c9b]) by PA4PR04MB9638.eurprd04.prod.outlook.com ([fe80::34dd:289e:9e8b:9c9b%7]) with mapi id 15.20.7046.015; Tue, 28 Nov 2023 08:26:47 +0000 From: David Lin To: linux-wireless@vger.kernel.org Cc: linux-kernel@vger.kernel.org, briannorris@chromium.org, kvalo@kernel.org, francesco@dolcini.it, tsung-hsien.hsieh@nxp.com, David Lin Subject: [PATCH] wifi: mwifiex: added extra delay for firmware ready. Date: Tue, 28 Nov 2023 16:25:44 +0800 Message-Id: <20231128082544.613179-1-yu-hao.lin@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: TYAPR03CA0004.apcprd03.prod.outlook.com (2603:1096:404:14::16) To PA4PR04MB9638.eurprd04.prod.outlook.com (2603:10a6:102:273::20) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR04MB9638:EE_|PAXPR04MB8653:EE_ X-MS-Office365-Filtering-Correlation-Id: e43a317b-4b2c-4654-659a-08dbefebc2da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y3yFcHA2xnIi/ZVI65ZBi9Dp8tE5Y/4OJckVvpfoR9VqwP9Jw+r6peizFz9VOCJIr8HgIUQ+pp3ro1DPdKwwlTTUzc54HDxiSwW40CkkPUvCI33AXB3p+cOBZOkQcrbPfN0LNAjuBQOZrCZH+zFt7KIyhPWAi6hLxRPDSCn2r5nsik7p8rgc1UmyfX0GMxsTlHRUpsqf7OAcdnz8xUd6SVytNXe4LHrRcGdC3IcX9M+cjf9HIxxci7drnTxXMPZNqnXsCol0oJET/tCm2jP2mkzOmO6U69BXBkWXc56mnU7KBhDtGw9+hBHYtPXsFOkj6A6xMRwN4Ju6+6M5uppT/1RHzdGJoe+4028bHivFoxX7fo0sxAmpZGrZUtQOiHEIn5yBZWodoXhYcF9jxLnSarBRrdqOSD886GOvfA/+3lMYzW5B7YtWIqwR5Y1p3li7UQi05zOlAV7Q/+YPhD8PXj/rKIp/Rr9eMdc69ki2FIA7r1Rw3Zrc2I4Nd1wVN391PMEijXCSqK7Fw1j0gzIy8Hp07Vp0J+sIiPdve4IzpuEloy2dOpdTFuygWEKqIxij X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR04MB9638.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(39860400002)(136003)(396003)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(5660300002)(38100700002)(4744005)(2906002)(36756003)(41300700001)(86362001)(316002)(6916009)(66476007)(6666004)(66556008)(66946007)(52116002)(6486002)(6512007)(478600001)(1076003)(2616005)(6506007)(8936002)(8676002)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pfpJbVgXLHM7YejGv+l969IZAhnFy/dqlfc6p0+IqPAYr+nXEsPqT3yFXye1Oh/vqgeK4IcoVD6VNHZl4leBdHHZfwRud5yvuisYZWarPhAQpG/yY9ALKxUCR5/XMYPD0+t9MV9YEbGLwepS1jinUoWCdiaRMcV2Q7DxWrwh1gKmTPyiplyohcIeDYZZLzVaasb87fn0yS1Sx/iARBAHRwxkCMgz6KR57eEvCjWWc+cUfZLbDNe4TKUGqCu/iEQGZ5Q4t/5KkN37sFUVgvIytm+8kElcOQvK88a7MyxYRJSwA8ulZH9a+joHgdV7apOOM0sNiCt7gh0nziCsNJoTv14ZjF9mOk/MyqVAf9a2d7tpGboOpBQSCHdK0m8SQhe4M4sVK0yaIxYwzt3hjNxvp4yyxhY95Yi0hzeYwmz8vh89P4hj7S4BXztGxiDtdwWlwWfhiAI68pvi4aWwagGZ/d0kphLQ2kfjKKLVOpcmhagHFqMzIoBhxQIj3XX3UXk8rwCOcRwTGMcpWwV8ywvPdc6ZCyhbyg6762DUxJV2K6eDG2ROl0pbQ146lvzoDZ/G1GLxUa+uoLnfK198QUdYcoIw8qsVTDDYA4p6G3mw6FF5AttMusqM0JiRXGCfhVM9+41YeejgdrUCOxROrGlhm3A+7rmMoLJfnH8H+oEu5LWzQ3KA/PTqeDO5EmoQktmPbatUqCvaqZ+7hDn6hm+u4vb1XkYm5evWhYkG5QMW5Hyuf/pN/yXF47Ji1El0voTqGsrXA67tP76GiVQKwP3uawOzBwRwSNxk1W9j6TUJFFRDZrWe7RC8H2VfOPsAQU1wHauOTlWd0+Ao5i3YDaTBuDi+KaXDoA007izha6eUwg9HQu21T2sYh+k1q5Ys2IrSXeLrghQtBWSf2TwmAttvKur8Rsk0KlSyq7xYW1utawIWijlw2SrAnRuTprUuv5NhIYoAhEfRcHduVGuL3AsqF2U3anZmXQnWLZRFJnHLjEBJt3mumjLGMncuxpECfeGWZS1JTAuz4ZldpoMiU7uBksh0iuLD62fr2qvZv7hMc8PGU7++xNaZ5yjS5fqz7OOlxuapSoAig9Z9ae7VZQiAkENgYFGY8BxtiQoOjbmJfWb2PQi311ot/XXxnWlnKqumPLyPxvGTVRrxnyv8GgbBfedo5PCCV53f3dT8AnL5rsHv5z2n1WEOYGwWkulYpRt2kYUzVOMtRk7vF/MLjQ1FGc1FFQmC3wNnSpqG0OXNJCqSCam/6EWheeQGuDH9k5iLruBN6pzhF3NUWsM/guiugmvG/6oSzv/8FMZD1//htC+UInmZXmeaWG2bnMWcQuo3niWcUuekp7BXbEa8qyvr2L4Vujs5L/4rMbyNlaWUjxHba37UutVTmtyJYmk6E9ICnn19thj06x7YEpHGzzXGcpKXkdblxA949+fgBmwfN0y8iTTVfWxijpKIdVvcFHfPWtmHTUKtmT6StdPVx6cyIETwCq6IjDNswN7LCoAY5b1A1OUB48t4mUfMrXk+fXeiG2fsgazrHu8vYCS+HevmW8pFOGcZrZEBoS3tYIYi3A+YqqzBcsLx4RfUQDR4x/IWk7I8BI81+atfvgixk8+ftemCMrCU8A1uOawStcT+UO2uM+bsBhLaj6qdELhMKY9g X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e43a317b-4b2c-4654-659a-08dbefebc2da X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9638.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 08:26:47.1790 (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: 3+Rz+52l2mqxYo8thzIBWuo3O4Q7y2Vql2JJ203ZzGKilqcJH1QPoou2HQcptPl0cuzQSG2HGIIuJxZtgysz4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8653 For SDIO IW416, in a corner case FW may return ready before complete full initialization. Command timeout may occur at driver load after reboot. Workaround by adding 100ms delay at checking FW status. Signed-off-by: David Lin --- drivers/net/wireless/marvell/mwifiex/sdio.c | 3 +++ 1 file changed, 3 insertions(+) base-commit: 783004b6dbda2cfe9a552a4cc9c1d168a2068f6c diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 6462a0ffe698..744e9403430a 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -783,6 +783,9 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, ret = -1; } + if (!ret) + msleep(100); + return ret; }