diff mbox series

iwlwifi: Increase microcodes loading timeout

Message ID 20211203020931.1419572-1-kai.heng.feng@canonical.com
State New
Headers show
Series iwlwifi: Increase microcodes loading timeout | expand

Commit Message

Kai-Heng Feng Dec. 3, 2021, 2:09 a.m. UTC
Intel AX201/AX211 device may not work at boot:
[    8.875307] iwlwifi 0000:00:14.3: SecBoot CPU1 Status: 0x7267, CPU2 Status: 0xb03
[    8.875418] iwlwifi 0000:00:14.3: UMAC PC: 0x80481126
[    8.875426] iwlwifi 0000:00:14.3: LMAC PC: 0x1541c
[    8.875430] iwlwifi 0000:00:14.3: WRT: Collecting data: ini trigger 13 fired (delay=0ms).
[    8.877906] iwlwifi 0000:00:14.3: Loaded firmware version: 64.97bbee0a.0 so-a0-gf-a0-64.ucode
...
[    8.878997] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110
[    8.878999] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110

Increase MVM_UCODE_ALIVE_TIMEOUT to 2 seconds can solve the issue.

The PNVM loading can also fail:
[    5.159949] iwlwifi 0000:00:14.3: loaded PNVM version 4b50f925
[    5.414211] iwlwifi 0000:00:14.3: Timeout waiting for PNVM load!
[    5.414219] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110
[    5.414224] iwlwifi 0000:00:14.3: WRT: Collecting data: ini trigger 13 fired (delay=0ms).
[    5.416618] iwlwifi 0000:00:14.3: Start IWL Error Log Dump:
[    5.416619] iwlwifi 0000:00:14.3: Transport status: 0x00000042, valid: 6
[    5.416620] iwlwifi 0000:00:14.3: Loaded firmware version: 64.97bbee0a.0 so-a0-gf-a0-64.ucode
...
[    5.914276] iwlwifi 0000:00:14.3: Failed to run INIT ucode: -110

Trial and error shows that the MVM_UCODE_PNVM_TIMEOUT also needs to be
bumped to 2 seconds to fully eliminate the issue.

The timeout values are verified by rebooting over 10k times.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/pnvm.h | 2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Kai-Heng Feng Dec. 13, 2021, 3:34 a.m. UTC | #1
On Fri, Dec 3, 2021 at 10:10 AM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> Intel AX201/AX211 device may not work at boot:
> [    8.875307] iwlwifi 0000:00:14.3: SecBoot CPU1 Status: 0x7267, CPU2 Status: 0xb03
> [    8.875418] iwlwifi 0000:00:14.3: UMAC PC: 0x80481126
> [    8.875426] iwlwifi 0000:00:14.3: LMAC PC: 0x1541c
> [    8.875430] iwlwifi 0000:00:14.3: WRT: Collecting data: ini trigger 13 fired (delay=0ms).
> [    8.877906] iwlwifi 0000:00:14.3: Loaded firmware version: 64.97bbee0a.0 so-a0-gf-a0-64.ucode
> ...
> [    8.878997] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110
> [    8.878999] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110
>
> Increase MVM_UCODE_ALIVE_TIMEOUT to 2 seconds can solve the issue.
>
> The PNVM loading can also fail:
> [    5.159949] iwlwifi 0000:00:14.3: loaded PNVM version 4b50f925
> [    5.414211] iwlwifi 0000:00:14.3: Timeout waiting for PNVM load!
> [    5.414219] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110
> [    5.414224] iwlwifi 0000:00:14.3: WRT: Collecting data: ini trigger 13 fired (delay=0ms).
> [    5.416618] iwlwifi 0000:00:14.3: Start IWL Error Log Dump:
> [    5.416619] iwlwifi 0000:00:14.3: Transport status: 0x00000042, valid: 6
> [    5.416620] iwlwifi 0000:00:14.3: Loaded firmware version: 64.97bbee0a.0 so-a0-gf-a0-64.ucode
> ...
> [    5.914276] iwlwifi 0000:00:14.3: Failed to run INIT ucode: -110
>
> Trial and error shows that the MVM_UCODE_PNVM_TIMEOUT also needs to be
> bumped to 2 seconds to fully eliminate the issue.
>
> The timeout values are verified by rebooting over 10k times.
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

A gentle ping...

> ---
>  drivers/net/wireless/intel/iwlwifi/fw/pnvm.h | 2 +-
>  drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h
> index 203c367dd4dee..b730330d8feac 100644
> --- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h
> +++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h
> @@ -10,7 +10,7 @@
>
>  #include "fw/notif-wait.h"
>
> -#define MVM_UCODE_PNVM_TIMEOUT (HZ / 4)
> +#define MVM_UCODE_PNVM_TIMEOUT (2 * HZ)
>
>  #define MAX_PNVM_NAME  64
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index 6ce78c03e51f7..0c5375f7baecf 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -24,7 +24,7 @@
>  #include "iwl-modparams.h"
>  #include "iwl-nvm-parse.h"
>
> -#define MVM_UCODE_ALIVE_TIMEOUT        (HZ)
> +#define MVM_UCODE_ALIVE_TIMEOUT        (2 * HZ)
>  #define MVM_UCODE_CALIB_TIMEOUT        (2 * HZ)
>
>  #define UCODE_VALID_OK cpu_to_le32(0x1)
> --
> 2.32.0
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h
index 203c367dd4dee..b730330d8feac 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h
@@ -10,7 +10,7 @@ 
 
 #include "fw/notif-wait.h"
 
-#define MVM_UCODE_PNVM_TIMEOUT	(HZ / 4)
+#define MVM_UCODE_PNVM_TIMEOUT	(2 * HZ)
 
 #define MAX_PNVM_NAME  64
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 6ce78c03e51f7..0c5375f7baecf 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -24,7 +24,7 @@ 
 #include "iwl-modparams.h"
 #include "iwl-nvm-parse.h"
 
-#define MVM_UCODE_ALIVE_TIMEOUT	(HZ)
+#define MVM_UCODE_ALIVE_TIMEOUT	(2 * HZ)
 #define MVM_UCODE_CALIB_TIMEOUT	(2 * HZ)
 
 #define UCODE_VALID_OK	cpu_to_le32(0x1)