Skip to content

Commit 1db385c

Browse files
committed
iwlwifi: recognize missing PNVM data and then log filename
We can detect that a FW SYSASSERT is due to missing PNVM data by checking the assertion code. When this happens, it's is useful for the user if we print the filename where the driver is looking for the data. Add the PNVM missing assertion code to the dump list and print out the name of the file we're looking for when this happens. Reported-by: Sam Edwards <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20211210090244.1d8725b7518a.I0c36617a7282bd445cda484d97ac4a83022706ee@changeid Signed-off-by: Luca Coelho <[email protected]>
1 parent ae4c1bb commit 1db385c

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

drivers/net/wireless/intel/iwlwifi/fw/dump.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "iwl-io.h"
1313
#include "iwl-prph.h"
1414
#include "iwl-csr.h"
15+
#include "pnvm.h"
1516

1617
/*
1718
* Note: This structure is read from the device with IO accesses,
@@ -100,6 +101,7 @@ static void iwl_fwrt_dump_umac_error_log(struct iwl_fw_runtime *fwrt)
100101
struct iwl_trans *trans = fwrt->trans;
101102
struct iwl_umac_error_event_table table = {};
102103
u32 base = fwrt->trans->dbg.umac_error_event_table;
104+
char pnvm_name[MAX_PNVM_NAME];
103105

104106
if (!base &&
105107
!(fwrt->trans->dbg.error_event_table_tlv_status &
@@ -117,6 +119,13 @@ static void iwl_fwrt_dump_umac_error_log(struct iwl_fw_runtime *fwrt)
117119
fwrt->trans->status, table.valid);
118120
}
119121

122+
if ((table.error_id & ~FW_SYSASSERT_CPU_MASK) ==
123+
FW_SYSASSERT_PNVM_MISSING) {
124+
iwl_pnvm_get_fs_name(trans, pnvm_name, sizeof(pnvm_name));
125+
IWL_ERR(fwrt, "PNVM data is missing, please install %s\n",
126+
pnvm_name);
127+
}
128+
120129
IWL_ERR(fwrt, "0x%08X | %s\n", table.error_id,
121130
iwl_fw_lookup_assert_desc(table.error_id));
122131
IWL_ERR(fwrt, "0x%08X | umac branchlink1\n", table.blink1);

drivers/net/wireless/intel/iwlwifi/fw/img.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/*
3-
* Copyright(c) 2019 - 2020 Intel Corporation
3+
* Copyright(c) 2019 - 2021 Intel Corporation
44
*/
55

66
#include "img.h"
@@ -49,10 +49,9 @@ u8 iwl_fw_lookup_notif_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def)
4949
}
5050
EXPORT_SYMBOL_GPL(iwl_fw_lookup_notif_ver);
5151

52-
#define FW_SYSASSERT_CPU_MASK 0xf0000000
5352
static const struct {
5453
const char *name;
55-
u8 num;
54+
u32 num;
5655
} advanced_lookup[] = {
5756
{ "NMI_INTERRUPT_WDG", 0x34 },
5857
{ "SYSASSERT", 0x35 },
@@ -73,6 +72,7 @@ static const struct {
7372
{ "NMI_INTERRUPT_ACTION_PT", 0x7C },
7473
{ "NMI_INTERRUPT_UNKNOWN", 0x84 },
7574
{ "NMI_INTERRUPT_INST_ACTION_PT", 0x86 },
75+
{ "PNVM_MISSING", FW_SYSASSERT_PNVM_MISSING },
7676
{ "ADVANCED_SYSASSERT", 0 },
7777
};
7878

drivers/net/wireless/intel/iwlwifi/fw/img.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,8 @@ u8 iwl_fw_lookup_cmd_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def);
279279

280280
u8 iwl_fw_lookup_notif_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def);
281281
const char *iwl_fw_lookup_assert_desc(u32 num);
282+
283+
#define FW_SYSASSERT_CPU_MASK 0xf0000000
284+
#define FW_SYSASSERT_PNVM_MISSING 0x0010070d
285+
282286
#endif /* __iwl_fw_img_h__ */

0 commit comments

Comments
 (0)