Merge tag 'for-usb-linus-2014-02-04' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / mmc / core / sdio_irq.c
index 3d8ceb4..aaa9046 100644 (file)
@@ -53,6 +53,17 @@ static int process_sdio_pending_irqs(struct mmc_host *host)
                return ret;
        }
 
+       if (pending && mmc_card_broken_irq_polling(card) &&
+           !(host->caps & MMC_CAP_SDIO_IRQ)) {
+               unsigned char dummy;
+
+               /* A fake interrupt could be created when we poll SDIO_CCCR_INTx
+                * register with a Marvell SD8797 card. A dummy CMD52 read to
+                * function 0 register 0xff can avoid this.
+                */
+               mmc_io_rw_direct(card, 0, 0, 0xff, 0, &dummy);
+       }
+
        count = 0;
        for (i = 1; i <= 7; i++) {
                if (pending & (1 << i)) {