From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 079B1C4167B for ; Tue, 5 Dec 2023 20:00:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345579AbjLEUAj (ORCPT ); Tue, 5 Dec 2023 15:00:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjLEUAg (ORCPT ); Tue, 5 Dec 2023 15:00:36 -0500 Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEA2F188; Tue, 5 Dec 2023 12:00:42 -0800 (PST) Received: from francesco-nb.int.toradex.com (31-10-206-125.static.upc.ch [31.10.206.125]) by mail11.truemail.it (Postfix) with ESMTPA id 3D6CC1F8F7; Tue, 5 Dec 2023 21:00:41 +0100 (CET) Date: Tue, 5 Dec 2023 21:00:37 +0100 From: Francesco Dolcini To: David Lin Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, briannorris@chromium.org, kvalo@kernel.org, francesco@dolcini.it, tsung-hsien.hsieh@nxp.com Subject: Re: [PATCH] wifi: mwifiex: added extra delay for firmware ready. Message-ID: References: <20231128082544.613179-1-yu-hao.lin@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128082544.613179-1-yu-hao.lin@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello David, thanks for your patch. Planning to run some test on this over the next days and we'll provide some actual feedback if this really solves the issue we are affected by. Just a couple of nitpicky comments on the actual patch. On the commit message you should use imperative mood, e.g. `wifi: mwifiex: add extra delay for firmware ready` with no period at the end of the line. On Tue, Nov 28, 2023 at 04:25:44PM +0800, David Lin wrote: > 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 Add Cc: stable@... > --- > drivers/net/wireless/marvell/mwifiex/sdio.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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); > + you could just add the delay after if (firmware_stat == FIRMWARE_READY_SDIO) { this would be more read-able to me. Adding also a short comment like /* Firmware might pretend to be ready, when it's not. * Wait a little bit more as a workaround */ Francesco