]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: wrt: add rt status and num of rx/tx fifos to dump
authorShahar S Matityahu <shahar.s.matityahu@intel.com>
Tue, 28 Aug 2018 13:15:55 +0000 (16:15 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 20 Dec 2018 07:09:09 +0000 (09:09 +0200)
Add the rt status of the last assert or 0 if the dump collection was
not initiated by an assert.  Add the number of rx and tx fifos in use.
These fields are added to dump info lst file.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/fw/dbg.h
drivers/net/wireless/intel/iwlwifi/fw/error-dump.h
drivers/net/wireless/intel/iwlwifi/fw/runtime.h
drivers/net/wireless/intel/iwlwifi/mvm/utils.c

index b17298ba7dc0f3dc315629ee3d54614d99e96ff7..d1e6196a52a2d4ea1ac1cd3617817f677fce7ec2 100644 (file)
@@ -828,6 +828,7 @@ _iwl_fw_error_dump(struct iwl_fw_runtime *fwrt,
                        sizeof(dump_info->dev_human_readable) - 1);
                strncpy(dump_info->bus_human_readable, fwrt->dev->bus->name,
                        sizeof(dump_info->bus_human_readable) - 1);
+               dump_info->rt_status = cpu_to_le32(fwrt->dump.rt_status);
 
                dump_data = iwl_fw_error_next_data(dump_data);
        }
index c14e4614a2ead4b7c092c3ee263c380803c57408..6aabbdd72326d86d060e4e52a1a8fb8ae2f77e0c 100644 (file)
@@ -102,6 +102,7 @@ static inline void iwl_fw_free_dump_desc(struct iwl_fw_runtime *fwrt)
        if (fwrt->dump.desc != &iwl_dump_desc_assert)
                kfree(fwrt->dump.desc);
        fwrt->dump.desc = NULL;
+       fwrt->dump.rt_status = 0;
 }
 
 void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt);
index cefafc9a082f6ef7d007c16a67e0dcb871e0c8f9..65faecf552cd2bffa83a6b360a44755754cbb1e4 100644 (file)
@@ -187,6 +187,8 @@ enum iwl_fw_error_dump_family {
  * @fw_human_readable: human readable FW version
  * @dev_human_readable: name of the device
  * @bus_human_readable: name of the bus used
+ * @rt_status: the error_id/rt_status that that triggered the latest dump
+ *     if the dump collection was not initiated by an assert, the value is 0
  */
 struct iwl_fw_error_dump_info {
        __le32 device_family;
@@ -194,6 +196,7 @@ struct iwl_fw_error_dump_info {
        u8 fw_human_readable[FW_VER_HUMAN_READABLE_SZ];
        u8 dev_human_readable[64];
        u8 bus_human_readable[8];
+       __le32 rt_status;
 } __packed;
 
 /**
index 77845de30c5c4b029d68d069a775d9fe63419579..4f7090f88cb010e7dbbab49198ea65b39a58f3c6 100644 (file)
@@ -142,6 +142,7 @@ struct iwl_fw_runtime {
                u32 *d3_debug_data;
                struct iwl_fw_ini_active_regs active_regs[IWL_FW_INI_MAX_REGION_ID];
                struct iwl_fw_ini_active_triggers active_trigs[IWL_FW_TRIGGER_ID_NUM];
+               u32 rt_status;
        } dump;
 #ifdef CONFIG_IWLWIFI_DEBUGFS
        struct {
index 5ad352ef8e9bf889ec61243bbcbc736494b68863..d116c6ae18ffaf9c21190695cd8d87bc84649746 100644 (file)
@@ -540,6 +540,9 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u32 base)
 
        iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table));
 
+       if (table.valid)
+               mvm->fwrt.dump.rt_status = table.error_id;
+
        if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
                IWL_ERR(trans, "Start IWL Error Log Dump:\n");
                IWL_ERR(trans, "Status: 0x%08lX, count: %d\n",