Skip to content

Commit 5f05c14

Browse files
committed
wifi: iwlwifi: pcie: set state to no-FW before reset handshake
The reset handshake attempts to kill the firmware, and it'll go into a pretty much dead state once we do that. However, if it times out, then we'll attempt to dump the firmware to be able to see why it didn't respond. During this dump, we cannot treat it as if it was still running, since we just tried to kill it, otherwise dumping will attempt to send a DBGC stop command. As this command will time out, we'll go into a reset loop. For now, fix this by setting the trans->state to say firmware isn't running before doing the reset handshake. In the longer term, we should clean up the way this state is handled. It's not entirely clear but it seems likely that this issue was introduced by my rework of the error handling, prior to that it would've been synchronous at that point and (I think) not have attempted to reset since it was already doing down. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219967 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219968 Fixes: 7391b2a ("wifi: iwlwifi: rework firmware error handling") Reviewed-by: Miriam Rachel Korenblit <[email protected]> Link: https://patch.msgid.link/20250411104054.63aa4f56894d.Ife70cfe997db03f0d07fdef2b164695739a05a63@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent a0f0dc9 commit 5f05c14

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,14 @@ static void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans)
147147
return;
148148

149149
if (trans->state >= IWL_TRANS_FW_STARTED &&
150-
trans_pcie->fw_reset_handshake)
150+
trans_pcie->fw_reset_handshake) {
151+
/*
152+
* Reset handshake can dump firmware on timeout, but that
153+
* should assume that the firmware is already dead.
154+
*/
155+
trans->state = IWL_TRANS_NO_FW;
151156
iwl_trans_pcie_fw_reset_handshake(trans);
157+
}
152158

153159
trans_pcie->is_down = true;
154160

0 commit comments

Comments
 (0)