Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2acdd86 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa3: fix the interrupt loop issue



The issue is that we delete interrupt handlers
first before cleaning up the suspend-irq registers
on ipa3_remove_interrupt_handler however the
IPAHAL introduces some delays about clean-up the
suspend-IRQ which causing ipa-driver stocks in the
loop keeping receiving interrupts but null handler.
The fix is to move those handlers deletion after
cleaning up the suspend-irq registers.

Change-Id: I257dcc5ef226a3886ade70a2e9556f7c7cc682c1
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent ec82f6fd
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -413,12 +413,6 @@ int ipa3_remove_interrupt_handler(enum ipa_irq_type interrupt)
		return -EFAULT;
	}

	kfree(ipa_interrupt_to_cb[irq_num].private_data);
	ipa_interrupt_to_cb[irq_num].deferred_flag = false;
	ipa_interrupt_to_cb[irq_num].handler = NULL;
	ipa_interrupt_to_cb[irq_num].private_data = NULL;
	ipa_interrupt_to_cb[irq_num].interrupt = -1;

	/* clean SUSPEND_IRQ_EN_EE_n_ADDR for L2 interrupt */
	if ((interrupt == IPA_TX_SUSPEND_IRQ) &&
		(ipa3_ctx->ipa_hw_type == IPA_HW_v3_1)) {
@@ -431,6 +425,13 @@ int ipa3_remove_interrupt_handler(enum ipa_irq_type interrupt)
	val &= ~bmsk;
	ipa3_uc_rg10_write_reg(IPA_IRQ_EN_EE_n, ipa_ee, val);

	/* delete the handlers after clean-up interrupts */
	kfree(ipa_interrupt_to_cb[irq_num].private_data);
	ipa_interrupt_to_cb[irq_num].deferred_flag = false;
	ipa_interrupt_to_cb[irq_num].handler = NULL;
	ipa_interrupt_to_cb[irq_num].private_data = NULL;
	ipa_interrupt_to_cb[irq_num].interrupt = -1;

	return 0;
}