Commit 37dee1f1 authored by Luca Coelho's avatar Luca Coelho
Browse files

iwlwifi: mvm: add IML/ROM information to the assertion dumps



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: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200424194456.a522161a7372.I2a65ee35a5e0242f8a0e106f126356dff81ef59d@changeid
parent a8eb340f
Loading
Loading
Loading
Loading
+20 −0
Original line number Original line Diff line number Diff line
@@ -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);
	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)
void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
{
{
	if (!test_bit(STATUS_DEVICE_ENABLED, &mvm->trans->status)) {
	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);
	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);
	iwl_fw_error_print_fseq_regs(&mvm->fwrt);
}
}