summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel
diff options
context:
space:
mode:
authorMordechay Goodstein <mordechay.goodstein@intel.com>2022-05-17 11:05:10 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-05-18 12:54:08 +0200
commit184f10db5f8f15902ac8687b26507b558ac3204d (patch)
treeb2c09e81916e9f353f68381e05e68b08bf981a20 /drivers/net/wireless/intel
parentiwlwifi: mvm: fix assert 1F04 upon reconfig (diff)
downloadlinux-184f10db5f8f15902ac8687b26507b558ac3204d.tar.xz
linux-184f10db5f8f15902ac8687b26507b558ac3204d.zip
iwlwifi: mvm: add OTP info in case of init failure
This helps to understand HW issues that can happen while initializing the nic. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20220517120045.48464938b27a.I9b381f0da5e0636ad6a5f6c13f98edb9031b50fb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-prph.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c15
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
index a22788a68168..157d1f31c487 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
@@ -389,6 +389,8 @@ enum {
#define WFPM_LMAC1_PD_NOTIFICATION 0xa0338c
#define WFPM_ARC1_PD_NOTIFICATION 0xa03044
#define HPM_SECONDARY_DEVICE_STATE 0xa03404
+#define WFPM_MAC_OTP_CFG7_ADDR 0xa03338
+#define WFPM_MAC_OTP_CFG7_DATA 0xa0333c
/* For UMAG_GEN_HW_STATUS reg check */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index e842816134f1..f041e77af059 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -287,6 +287,9 @@ static bool iwl_wait_phy_db_entry(struct iwl_notif_wait_data *notif_wait,
static void iwl_mvm_print_pd_notification(struct iwl_mvm *mvm)
{
+#define IWL_FW_PRINT_REG_INFO(reg_name) \
+ IWL_ERR(mvm, #reg_name ": 0x%x\n", iwl_read_umac_prph(trans, reg_name))
+
struct iwl_trans *trans = mvm->trans;
enum iwl_device_family device_family = trans->trans_cfg->device_family;
@@ -294,15 +297,15 @@ static void iwl_mvm_print_pd_notification(struct iwl_mvm *mvm)
return;
if (device_family <= IWL_DEVICE_FAMILY_9000)
- IWL_ERR(mvm, "WFPM_ARC1_PD_NOTIFICATION: 0x%x\n",
- iwl_read_umac_prph(trans, WFPM_ARC1_PD_NOTIFICATION));
+ IWL_FW_PRINT_REG_INFO(WFPM_ARC1_PD_NOTIFICATION);
else
- IWL_ERR(mvm, "WFPM_LMAC1_PD_NOTIFICATION: 0x%x\n",
- iwl_read_umac_prph(trans, WFPM_LMAC1_PD_NOTIFICATION));
+ IWL_FW_PRINT_REG_INFO(WFPM_LMAC1_PD_NOTIFICATION);
- IWL_ERR(mvm, "HPM_SECONDARY_DEVICE_STATE: 0x%x\n",
- iwl_read_umac_prph(trans, HPM_SECONDARY_DEVICE_STATE));
+ IWL_FW_PRINT_REG_INFO(HPM_SECONDARY_DEVICE_STATE);
+ /* print OPT info */
+ IWL_FW_PRINT_REG_INFO(WFPM_MAC_OTP_CFG7_ADDR);
+ IWL_FW_PRINT_REG_INFO(WFPM_MAC_OTP_CFG7_DATA);
}
static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,