mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
wifi: iwlwifi: replace SUPPRESS_CMD_ERROR_ONCE status bit with a boolean
Convert STATUS_SUPPRESS_CMD_ERROR_ONCE from a status bit to a simple bool field in struct iwl_trans, as atomicity is not needed. Signed-off-by: Rotem Kerem <rotem.kerem@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250909061931.b33366c11a45.I75aac05afd8c4d8ef217d03327c1a027d6e7667e@changeid
This commit is contained in:
parent
728d92a341
commit
b7a962584f
|
|
@ -284,8 +284,6 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
|
|||
* @STATUS_RFKILL_OPMODE: RF-kill state reported to opmode
|
||||
* @STATUS_FW_ERROR: the fw is in error state
|
||||
* @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
|
||||
* @STATUS_SUPPRESS_CMD_ERROR_ONCE: suppress "FW error in SYNC CMD" once,
|
||||
* e.g. for testing
|
||||
* @STATUS_IN_SW_RESET: device is undergoing reset, cleared by opmode
|
||||
* via iwl_trans_finish_sw_reset()
|
||||
* @STATUS_RESET_PENDING: reset worker was scheduled, but didn't dump
|
||||
|
|
@ -302,7 +300,6 @@ enum iwl_trans_status {
|
|||
STATUS_RFKILL_OPMODE,
|
||||
STATUS_FW_ERROR,
|
||||
STATUS_TRANS_DEAD,
|
||||
STATUS_SUPPRESS_CMD_ERROR_ONCE,
|
||||
STATUS_IN_SW_RESET,
|
||||
STATUS_RESET_PENDING,
|
||||
STATUS_TRANS_RESET_IN_PROGRESS,
|
||||
|
|
@ -849,6 +846,8 @@ struct iwl_trans_info {
|
|||
* @pnvm_loaded: indicates PNVM was loaded
|
||||
* @pm_support: set to true in start_hw if link pm is supported
|
||||
* @ltr_enabled: set to true if the LTR is enabled
|
||||
* @suppress_cmd_error_once: suppress "FW error in SYNC CMD" once,
|
||||
* e.g. for testing
|
||||
* @fail_to_parse_pnvm_image: set to true if pnvm parsing failed
|
||||
* @reduce_power_loaded: indicates reduced power section was loaded
|
||||
* @failed_to_load_reduce_power_image: set to true if pnvm loading failed
|
||||
|
|
@ -883,6 +882,7 @@ struct iwl_trans {
|
|||
const struct iwl_trans_info info;
|
||||
bool reduced_cap_sku;
|
||||
bool step_urm;
|
||||
bool suppress_cmd_error_once;
|
||||
|
||||
bool pm_support;
|
||||
bool ltr_enabled;
|
||||
|
|
@ -1194,11 +1194,6 @@ static inline u16 iwl_trans_get_num_rbds(struct iwl_trans *trans)
|
|||
return result;
|
||||
}
|
||||
|
||||
static inline void iwl_trans_suppress_cmd_error_once(struct iwl_trans *trans)
|
||||
{
|
||||
set_bit(STATUS_SUPPRESS_CMD_ERROR_ONCE, &trans->status);
|
||||
}
|
||||
|
||||
static inline bool iwl_trans_device_enabled(struct iwl_trans *trans)
|
||||
{
|
||||
return test_bit(STATUS_DEVICE_ENABLED, &trans->status);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mld *mld, char *buf,
|
|||
|
||||
if (count == 6 && !strcmp(buf, "nolog\n")) {
|
||||
mld->fw_status.do_not_dump_once = true;
|
||||
iwl_trans_suppress_cmd_error_once(mld->trans);
|
||||
mld->trans->suppress_cmd_error_once = true;
|
||||
}
|
||||
|
||||
/* take the return value to make compiler happy - it will
|
||||
|
|
|
|||
|
|
@ -1134,7 +1134,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mvm *mvm, char *buf,
|
|||
|
||||
if (count == 6 && !strcmp(buf, "nolog\n")) {
|
||||
set_bit(IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE, &mvm->status);
|
||||
iwl_trans_suppress_cmd_error_once(mvm->trans);
|
||||
mvm->trans->suppress_cmd_error_once = true;
|
||||
}
|
||||
|
||||
/* take the return value to make compiler happy - it will fail anyway */
|
||||
|
|
|
|||
|
|
@ -2601,8 +2601,9 @@ static int iwl_trans_pcie_send_hcmd_sync(struct iwl_trans *trans,
|
|||
}
|
||||
|
||||
if (test_bit(STATUS_FW_ERROR, &trans->status)) {
|
||||
if (!test_and_clear_bit(STATUS_SUPPRESS_CMD_ERROR_ONCE,
|
||||
&trans->status)) {
|
||||
if (trans->suppress_cmd_error_once) {
|
||||
trans->suppress_cmd_error_once = false;
|
||||
} else {
|
||||
IWL_ERR(trans, "FW error in SYNC CMD %s\n", cmd_str);
|
||||
dump_stack();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user