On 8/03/19 5:27 AM, Yinbo Zhu wrote: > From: Yinbo Zhu <yinbo.zhu@xxxxxxx> > > This patch is to write SDHCI_INT_DATA_END to SDHCI_INT_STATUS to clear it That cannot be done in sdhci.c because sdhci.c does not know that the vendor driver has masked the bit in 'intmask'. See my comments for patch 4 > > Signed-off-by: Yinbo Zhu <yinbo.zhu@xxxxxxx> > --- > drivers/mmc/host/sdhci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index a8141ff9be03..88c77c9758d8 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -3032,7 +3032,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) > > /* Clear selected interrupts. */ > mask = intmask & (SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK | > - SDHCI_INT_BUS_POWER); > + SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END); It is necessary to write '1' to clear a bit. At this point, sdhci-of-esdhc.c would have cleared SDHCI_INT_DATA_END in intmask. Also SDHCI_INT_DATA_END is already in SDHCI_INT_DATA_MASK. > sdhci_writel(host, mask, SDHCI_INT_STATUS); > > if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { >