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

Commit f08b068d authored by Ritesh Harjani's avatar Ritesh Harjani
Browse files

mmc: sdhci: Handle cmdq_irq before clearing error interrupt.



cmdq_irq should be handled before clearning error interrupt.
Because in case of an error CQE needs to be halted/disabled
in cmdq_irq, before we clear the error interrupt.
Otherwise, CQE might start processing other requests whose
doorbell is set, even in case of error in previous completed
request.

Change-Id: I8c77ca08dcf440293844120c1b59d2dada84bac5
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent 1836f037
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3099,19 +3099,21 @@ static irqreturn_t sdhci_cmdq_irq(struct sdhci_host *host, u32 intmask)
{
	int err = 0;
	u32 mask = 0;
	irqreturn_t ret;

	if (intmask & SDHCI_INT_CMD_MASK)
		err = sdhci_get_cmd_err(intmask);
	else if (intmask & SDHCI_INT_DATA_MASK)
		err = sdhci_get_data_err(intmask);

	ret = cmdq_irq(host->mmc, err);
	if (err) {
		/* Clear the error interrupts */
		mask = intmask & SDHCI_INT_ERROR_MASK;
		sdhci_writel(host, mask, SDHCI_INT_STATUS);
	}
	return ret;

	return cmdq_irq(host->mmc, err);
}

#else