Explorar o código

qcacld-3.0: Change spin lock APIs to use spin lock IRQ

The spin lock APIs are accessed from wake MSI hard irq handler as well,
causing deadlock. To solve this, change spin lock APIs to use spin lock
IRQ.
CRs-Fixed: 2519986

Change-Id: I4d05abd294a71a26915210ae7e2be9be6aa7a996
Alan Chen %!s(int64=5) %!d(string=hai) anos
pai
achega
74e4dd0fd6
Modificáronse 1 ficheiros con 10 adicións e 4 borrados
  1. 10 4
      components/pmo/core/inc/wlan_pmo_wow.h

+ 10 - 4
components/pmo/core/inc/wlan_pmo_wow.h

@@ -494,9 +494,12 @@ static inline
 void pmo_core_update_wow_initial_wake_up(struct pmo_psoc_priv_obj *psoc_ctx,
 	bool value)
 {
-	qdf_spin_lock_bh(&psoc_ctx->lock);
+	/* Intentionally using irq save since initial wake flag is updated
+	 * from wake msi hard irq handler
+	 */
+	qdf_spin_lock_irqsave(&psoc_ctx->lock);
 	psoc_ctx->wow.wow_initial_wake_up = value;
-	qdf_spin_unlock_bh(&psoc_ctx->lock);
+	qdf_spin_unlock_irqrestore(&psoc_ctx->lock);
 }
 
 /**
@@ -510,9 +513,12 @@ bool pmo_core_get_wow_initial_wake_up(struct pmo_psoc_priv_obj *psoc_ctx)
 {
 	bool value;
 
-	qdf_spin_lock_bh(&psoc_ctx->lock);
+	/* Intentionally using irq save since initial wake flag is updated
+	 * from wake msi hard irq handler
+	 */
+	qdf_spin_lock_irqsave(&psoc_ctx->lock);
 	value = psoc_ctx->wow.wow_initial_wake_up;
-	qdf_spin_unlock_bh(&psoc_ctx->lock);
+	qdf_spin_unlock_irqrestore(&psoc_ctx->lock);
 
 	return value;
 }