All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 05/11] iwlwifi: mvm: add IML/ROM information to the assertion dumps
Date: Fri, 24 Apr 2020 19:47:01 +0300	[thread overview]
Message-ID: <iwlwifi.20200424194456.a522161a7372.I2a65ee35a5e0242f8a0e106f126356dff81ef59d@changeid> (raw)
In-Reply-To: <20200424164707.2715869-1-luca@coelho.fi>

From: Luca Coelho <luciano.coelho@intel.com>

Dump the IML/ROM error code and data, which are read from some
registers, when printing an assertion dump.  This makes it easier to
debug IML/ROM errors.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/mvm/utils.c    | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index ee8f152e7606..be57b8391850 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -586,6 +586,23 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u8 lmac_num)
 	IWL_ERR(mvm, "0x%08X | flow_handler\n", table.flow_handler);
 }
 
+static void iwl_mvm_dump_iml_error_log(struct iwl_mvm *mvm)
+{
+	struct iwl_trans *trans = mvm->trans;
+	u32 error;
+
+	error = iwl_read_umac_prph(trans, UMAG_SB_CPU_2_STATUS);
+
+	IWL_ERR(trans, "IML/ROM dump:\n");
+
+	if (error & 0xFFFF0000)
+		IWL_ERR(trans, "IML/ROM SYSASSERT:\n");
+
+	IWL_ERR(mvm, "0x%08X | IML/ROM error/state\n", error);
+	IWL_ERR(mvm, "0x%08X | IML/ROM data1\n",
+		iwl_read_umac_prph(trans, UMAG_SB_CPU_1_STATUS));
+}
+
 void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
 {
 	if (!test_bit(STATUS_DEVICE_ENABLED, &mvm->trans->status)) {
@@ -601,6 +618,9 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
 
 	iwl_mvm_dump_umac_error_log(mvm);
 
+	if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
+		iwl_mvm_dump_iml_error_log(mvm);
+
 	iwl_fw_error_print_fseq_regs(&mvm->fwrt);
 }
 
-- 
2.26.2


  parent reply	other threads:[~2020-04-24 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 16:46 [PATCH 00/11] iwlwifi: updates intended for v5.8 2020-04-24-2 Luca Coelho
2020-04-24 16:46 ` [PATCH 01/11] iwlwifi: dbg: set debug descriptor to NULL outside of iwl_fw_free_dump_desc Luca Coelho
2020-04-24 16:46 ` [PATCH 02/11] iwlwifi: mvm: initialize iwl_dev_tx_power_cmd to zero Luca Coelho
2020-04-24 16:46 ` [PATCH 03/11] iwlwifi: yoyo: remove magic number Luca Coelho
2020-04-24 16:47 ` [PATCH 04/11] iwlwifi: move iwl_set_soc_latency to iwl-drv to be used by other op_modes Luca Coelho
2020-04-24 16:47 ` Luca Coelho [this message]
2020-04-24 16:47 ` [PATCH 06/11] iwlwifi: pcie: remove outdated comment about PCI RTPM reference Luca Coelho
2020-04-24 16:47 ` [PATCH 07/11] iwlwifi: pcie: remove mangling for iwl_ax101_cfg_qu_hr Luca Coelho
2020-04-24 16:47 ` [PATCH 08/11] iwlwifi: pcie: convert QnJ with Hr to the device table Luca Coelho
2020-04-24 16:47 ` [PATCH 09/11] iwlwifi: pcie: remove occurrences of 22000 in the FW name defines Luca Coelho
2020-04-24 16:47 ` [PATCH 10/11] iwlwifi: pcie: convert all AX101 devices to the device tables Luca Coelho
2020-04-24 16:47 ` [PATCH 11/11] iwlwifi: dump api version in yaml format Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iwlwifi.20200424194456.a522161a7372.I2a65ee35a5e0242f8a0e106f126356dff81ef59d@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.