wifi: iwlwifi: mvm: leave a print in the logs when we call fw_nmi()
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 12 May 2024 04:58:57 +0000 (07:58 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 23 May 2024 08:53:03 +0000 (10:53 +0200)
When we crash the firmware, we need to know why we decided to do so.
Almost all the callsites of iwl_force_nmi() print something in the logs
that explain why the driver decided to crash the firmware.
Debugfs doesn't print anything and it is then hard to understand why the
firmware has crashed.
Add a simple print in the debugfs hook to ease the debug.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240512075822.e2558de222dc.Idd81777c47264e6f557b086625895c1dc2f667f3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

index 79f4ac8cbc729e9a6caaf393080fe99a4320892e..96c9382b98fb545be12482193e63a13fb85c0af4 100644 (file)
@@ -1396,6 +1396,8 @@ static ssize_t iwl_dbgfs_fw_nmi_write(struct iwl_mvm *mvm, char *buf,
        if (!iwl_mvm_firmware_running(mvm))
                return -EIO;
 
+       IWL_ERR(mvm, "Triggering an NMI from debugfs\n");
+
        if (count == 6 && !strcmp(buf, "nolog\n"))
                set_bit(IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE, &mvm->status);