]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: iwlwifi: pcie: reinit device properly during TOP reset
authorJohannes Berg <johannes.berg@intel.com>
Mon, 9 Jun 2025 18:21:21 +0000 (21:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:15 +0000 (18:41 +0200)
[ Upstream commit eda36f5195d6c078e20331f1dfcf688bd6567c2b ]

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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250609211928.903444f8e8e8.I7f70600339abb9d658f97924aef22faf1af00a3c@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/pcie/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 3b7c12fc4f9e4efa06259326086cf35a6ed28aea..df4eaaa7efd2b5bc721ea0f5a25eff77da3d1904 100644 (file)
@@ -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);
index 5a9c3b7976a109bf24555c17e95b4b18f513e4f7..c7ada07a7075d1e0d1787f10fdb9dedcb00f626c 100644 (file)
@@ -612,6 +612,11 @@ again:
                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;
index cc4d289b110dc5dc4d62b0aecc0db7fcc45ba6e4..07a9255c98683152097c9fb8995e87193e455bf0 100644 (file)
@@ -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;