wifi: iwlwifi: pcie: initiate TOP reset if requested

At load time, the firmware may request a TOP reset via
bit 6 in the IPC status register. Handle that and set
TOP reset in that case. Since the init will be retried,
there's no need to do anything else.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250609211928.0875d5f7e066.I62f14008d89416bc4a3a1056e06762561a7fac57@changeid
This commit is contained in:
Johannes Berg
2025-06-09 21:21:17 +03:00
committed by Miri Korenblit
parent c8a00a6e89
commit 8ecc3928f2
2 changed files with 10 additions and 0 deletions

View File

@@ -113,6 +113,7 @@
#define CSR_IPC_STATE_RESET_SW_READY 1
#define CSR_IPC_STATE_RESET_TOP_READY 2
#define CSR_IPC_STATE_RESET_TOP_FOLLOWER 3
#define CSR_IPC_STATE_TOP_RESET_REQ BIT(6)
#define CSR_IPC_SLEEP_CONTROL (CSR_BASE + 0x114)
#define CSR_IPC_SLEEP_CONTROL_SUSPEND 0x3

View File

@@ -1700,6 +1700,15 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)
timer_delete(&trans_pcie->txqs.txq[i]->stuck_timer);
}
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_SC) {
u32 val = iwl_read32(trans, CSR_IPC_STATE);
if (val & CSR_IPC_STATE_TOP_RESET_REQ) {
IWL_ERR(trans, "FW requested TOP reset for FSEQ\n");
trans->do_top_reset = 1;
}
}
/* The STATUS_FW_ERROR bit is set in this function. This must happen
* before we wake up the command caller, to ensure a proper cleanup. */
iwl_trans_fw_error(trans, IWL_ERR_TYPE_IRQ);