Commit 67c63867 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: rename 'pldr_sync'

PLDR (product level device reset) is a Windows term, and
is something the driver triggers there, AFAICT.

Really what 'pldr_sync' here wants to capture is whether
or not the firmware will/may do a product reset during
initialization, which makes the device drop off the bus,
requiring a rescan. If this is the case, obviously the
init will fail/time out, so we don't want to report all
kinds of errors etc., hence this tracking variable.

Rename it to 'fw_product_reset' to capture the meaning
better.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240618194245.ccf849642af8.I01dded6b2393771b7baf8b4b17336784d987c7c2@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a02079af
...@@ -408,7 +408,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm, ...@@ -408,7 +408,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
UREG_LMAC2_CURRENT_PC)); UREG_LMAC2_CURRENT_PC));
} }
if (ret == -ETIMEDOUT && !mvm->pldr_sync) if (ret == -ETIMEDOUT && !mvm->fw_product_reset)
iwl_fw_dbg_error_collect(&mvm->fwrt, iwl_fw_dbg_error_collect(&mvm->fwrt,
FW_DBG_TRIGGER_ALIVE_TIMEOUT); FW_DBG_TRIGGER_ALIVE_TIMEOUT);
...@@ -627,8 +627,8 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) ...@@ -627,8 +627,8 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm)
if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) { if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) {
sb_cfg = iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG); sb_cfg = iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG);
/* if needed, we'll reset this on our way out later */ /* if needed, we'll reset this on our way out later */
mvm->pldr_sync = sb_cfg == SB_CFG_RESIDES_IN_ROM; mvm->fw_product_reset = sb_cfg == SB_CFG_RESIDES_IN_ROM;
if (mvm->pldr_sync && iwl_mei_pldr_req()) if (mvm->fw_product_reset && iwl_mei_pldr_req())
return -EBUSY; return -EBUSY;
} }
...@@ -647,7 +647,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) ...@@ -647,7 +647,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm)
IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret); IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret);
/* if we needed reset then fail here, but notify and remove */ /* if we needed reset then fail here, but notify and remove */
if (mvm->pldr_sync) { if (mvm->fw_product_reset) {
iwl_mei_alive_notif(false); iwl_mei_alive_notif(false);
iwl_trans_pcie_remove(mvm->trans, true); iwl_trans_pcie_remove(mvm->trans, true);
} }
...@@ -1407,14 +1407,14 @@ int iwl_mvm_up(struct iwl_mvm *mvm) ...@@ -1407,14 +1407,14 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
ret = iwl_mvm_load_rt_fw(mvm); ret = iwl_mvm_load_rt_fw(mvm);
if (ret) { if (ret) {
IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret); IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret);
if (ret != -ERFKILL && !mvm->pldr_sync) if (ret != -ERFKILL && !mvm->fw_product_reset)
iwl_fw_dbg_error_collect(&mvm->fwrt, iwl_fw_dbg_error_collect(&mvm->fwrt,
FW_DBG_TRIGGER_DRIVER); FW_DBG_TRIGGER_DRIVER);
goto error; goto error;
} }
/* FW loaded successfully */ /* FW loaded successfully */
mvm->pldr_sync = false; mvm->fw_product_reset = false;
iwl_fw_disable_dbg_asserts(&mvm->fwrt); iwl_fw_disable_dbg_asserts(&mvm->fwrt);
iwl_get_shared_mem_conf(&mvm->fwrt); iwl_get_shared_mem_conf(&mvm->fwrt);
......
...@@ -1325,7 +1325,12 @@ struct iwl_mvm { ...@@ -1325,7 +1325,12 @@ struct iwl_mvm {
bool sta_remove_requires_queue_remove; bool sta_remove_requires_queue_remove;
bool mld_api_is_used; bool mld_api_is_used;
bool pldr_sync; /*
* Indicates that firmware will do a product reset (and then
* therefore fail to load) when we start it (due to OTP burn),
* if so don't dump errors etc. since this is expected.
*/
bool fw_product_reset;
struct iwl_time_sync_data time_sync; struct iwl_time_sync_data time_sync;
......
...@@ -875,7 +875,7 @@ static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm) ...@@ -875,7 +875,7 @@ static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm)
IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret); IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret);
/* no longer need this regardless of failure or not */ /* no longer need this regardless of failure or not */
mvm->pldr_sync = false; mvm->fw_product_reset = false;
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment