Commit eda36f51 authored by Johannes Berg's avatar Johannes Berg Committed by Miri Korenblit
Browse files

wifi: iwlwifi: pcie: reinit device properly during TOP reset



During TOP reset a full _iwl_trans_pcie_start_hw() is needed so
the device is properly initialized for operation. Fix that.

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/20250609211928.903444f8e8e8.I7f70600339abb9d658f97924aef22faf1af00a3c@changeid
parent 6efaf59f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1074,6 +1074,7 @@ void iwl_pcie_rx_allocator_work(struct work_struct *data);

/* common trans ops for all generations transports */
void iwl_trans_pcie_op_mode_enter(struct iwl_trans *trans);
int _iwl_trans_pcie_start_hw(struct iwl_trans *trans);
int iwl_trans_pcie_start_hw(struct iwl_trans *trans);
void iwl_trans_pcie_op_mode_leave(struct iwl_trans *trans);
void iwl_trans_pcie_write8(struct iwl_trans *trans, u32 ofs, u8 val);
+5 −0
Original line number Diff line number Diff line
@@ -610,6 +610,11 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
		msleep(10);
		IWL_INFO(trans, "TOP reset successful, reinit now\n");
		/* now load the firmware again properly */
		ret = _iwl_trans_pcie_start_hw(trans);
		if (ret) {
			IWL_ERR(trans, "failed to start HW after TOP reset\n");
			goto out;
		}
		trans_pcie->prph_scratch->ctrl_cfg.control.control_flags &=
			~cpu_to_le32(IWL_PRPH_SCRATCH_TOP_RESET);
		top_reset_done = true;
+1 −1
Original line number Diff line number Diff line
@@ -1845,7 +1845,7 @@ static int iwl_pcie_gen2_force_power_gating(struct iwl_trans *trans)
	return iwl_trans_pcie_sw_reset(trans, true);
}

static int _iwl_trans_pcie_start_hw(struct iwl_trans *trans)
int _iwl_trans_pcie_start_hw(struct iwl_trans *trans)
{
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
	int err;