Thread (13 messages) flat view 13 messages, 1 author, 2021-12-19
STALE1698d LANDED

Landed in mainline as 22a1ee8e1e59 on 2021-12-21.

[PATCH 06/12] iwlwifi: return op_mode only in case the failure is from MEI

From: Luca Coelho <hidden>
Date: 2021-12-19 11:28:50
Subsystem: intel wireless wifi link (iwlwifi), the rest · Maintainers: Miri Korenblit, Linus Torvalds

From: Mordechay Goodstein <redacted>

Currently we always return the op_mode with valid pointer in case
getting NVM failed, while it's only relevant for cases that CSME is the
owner of the nic.

Fix this by checking also who's the owner of the nic.

Signed-off-by: Mordechay Goodstein <redacted>
Signed-off-by: Luca Coelho <redacted>
---
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 83d5df52f2af..3a308585ed06 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1303,12 +1303,18 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
 
 	mvm->mei_registered = !iwl_mei_register(mvm, &mei_ops);
 
-	/*
-	 * Get NVM failed, but we are registered to MEI, we'll get
-	 * the NVM later when it'll be possible to get it from CSME.
-	 */
-	if (iwl_mvm_start_get_nvm(mvm) && mvm->mei_registered)
-		return op_mode;
+	if (iwl_mvm_start_get_nvm(mvm)) {
+		/*
+		 * Getting NVM failed while CSME is the owner, but we are
+		 * registered to MEI, we'll get the NVM later when it'll be
+		 * possible to get it from CSME.
+		 */
+		if (trans->csme_own && mvm->mei_registered)
+			return op_mode;
+
+		goto out_thermal_exit;
+	}
+
 
 	if (iwl_mvm_start_post_nvm(mvm))
 		goto out_thermal_exit;
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help