Bladeren bron

qcacmn: Fix dead lock issue while enabling group interrupts

We are taking spinlock irqsave before requesting group irqs. But some
times interrupt is coming immediately for the iqr we reuested even before
releasing spinlock irqlock. Since We are trying to take same spin lock
again for disabling interruts in irq handler dead lock is happening.
Fixing the issue by not handling irqs coming during request irq time.

Change-Id: I31484ab64942cc9e318139c522aac3d7cef9b109
CRs-Fixed: 2286715
Venkateswara Swamy Bandaru 6 jaren geleden
bovenliggende
commit
50d811e50d
2 gewijzigde bestanden met toevoegingen van 6 en 4 verwijderingen
  1. 5 3
      hif/src/hif_exec.c
  2. 1 1
      hif/src/snoc/if_ahb.c

+ 5 - 3
hif/src/hif_exec.c

@@ -329,10 +329,12 @@ irqreturn_t hif_ext_group_interrupt_handler(int irq, void *context)
 	struct hif_exec_context *hif_ext_group = context;
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ext_group->hif);
 
-	hif_ext_group->irq_disable(hif_ext_group);
-	qdf_atomic_inc(&scn->active_grp_tasklet_cnt);
+	if (hif_ext_group->irq_requested) {
+		hif_ext_group->irq_disable(hif_ext_group);
+		qdf_atomic_inc(&scn->active_grp_tasklet_cnt);
 
-	hif_ext_group->sched_ops->schedule(hif_ext_group);
+		hif_ext_group->sched_ops->schedule(hif_ext_group);
+	}
 
 	return IRQ_HANDLED;
 }

+ 1 - 1
hif/src/snoc/if_ahb.c

@@ -293,7 +293,6 @@ int hif_ahb_configure_grp_irq(struct hif_softc *scn,
 	hif_ext_group->work_complete = &hif_dummy_grp_done;
 
 	qdf_spin_lock_irqsave(&hif_ext_group->irq_lock);
-	hif_ext_group->irq_requested = true;
 
 	for (j = 0; j < hif_ext_group->numirq; j++) {
 		irq_name = ic_irqname[hif_ext_group->irq[j]];
@@ -313,6 +312,7 @@ int hif_ahb_configure_grp_irq(struct hif_softc *scn,
 		}
 		hif_ext_group->os_irq[j] = irq;
 	}
+	hif_ext_group->irq_requested = true;
 
 end:
 	qdf_spin_unlock_irqrestore(&hif_ext_group->irq_lock);