Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp531025rdb; Tue, 5 Dec 2023 12:00:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOXbrfxKhZXkOFxIW2sagb5QgAtc9WQwW0n2cZBHNcU75v6ZgCyZTC1M57eh9fNQLFASH5 X-Received: by 2002:a05:620a:60f4:b0:77f:2496:1016 with SMTP id dy52-20020a05620a60f400b0077f24961016mr80638qkb.113.1701806449805; Tue, 05 Dec 2023 12:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701806449; cv=none; d=google.com; s=arc-20160816; b=joT3a66MPAQLCcK6ODDB/xl1s5HwMcV6Ik0MdChSfLHwpzrsVg62DZKvVvKfrJ0SZp 3dXNTrEQUcDLE562QAuoNIrp3zcBN6trESvc6Ltw3Ob6cJC412cJuSMNRvWy3ddpyXml DayvyltFLbsI/7qNoOe1gD0QjgkYxtLR/fsMlF5/c1/NkNmOQiB//dwQQe4pvqkOT/SV DDxL7Ci+i5sd9uFGM1evEusDJYNm0Mxutd/nU4o9foCa4tAT/8+Psz6YC+poer/Dtcpp sBbKcc3jOwfIsiaDIZrNPgPKSbSWHomH84gs+Nf5REWc3gMpGMNMwEVZe8PwnjZR7nJl C4Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=CK5f4oTPCfVNOqvNGA0IG9M4VhbivkcKZlQFdGJFB+g=; fh=2GZY/U2AYZSRm52+t8rjg0AVUvtkiHh4KhGZiS9fuqU=; b=OY7EEuM8SAFFVJHuauN5UeJtT026ZXve4iXCMhqAh08Z0pltUeIlrq+lJl4Px4sJW9 reAovuqOGztNLnw1Hm7z1ecCK7l+jbzPz1Ucco3mEbZPhJyqSVO+a976jg/IGoPoUIKw 54q38nj7UH1AHNhYQOJ4yhKWWRXQgb2b3j5r/THxZICu6sZppwT2SS+nyzfJbOlAeSwf dqK30gqqdkP7dICSqm9cbPdk7bvpqequGtXuXrvfCkTHEIoLrJz27UWiyrN6IKgjsEhY 7RkeRGB1cIDTnZ6qJVy647PZ5hwJxCtqdQIDXvcaubFFd42W50tJChzhTTQNDUo6pqk1 hAHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-437-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-437-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ay16-20020a05620a179000b0077c0f390181si13267870qkb.249.2023.12.05.12.00.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:00:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-437-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-437-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-437-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4018B1C20FDA for ; Tue, 5 Dec 2023 20:00:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 681696ABB8; Tue, 5 Dec 2023 20:00:46 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org 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> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> 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