X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fcore%2Fsdio_irq.c;h=01daee934d16c270887bdbb097d8911b17ae832d;hb=17b759aff916b4d02721e75ce5ed82b1903e5bd6;hp=01922d29241d73871a831a6bc3accca3a3b6d1d1;hpb=112c9db91ee6bf19eca7cbb6854be3127381c229;p=linux-2.6 diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 01922d2924..01daee934d 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -70,7 +70,8 @@ static int sdio_irq_thread(void *_host) * asynchronous notification of pending SDIO card interrupts * hence we poll for them in that case. */ - period = msecs_to_jiffies(10); + period = (host->caps & MMC_CAP_SDIO_IRQ) ? + MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(10); pr_debug("%s: IRQ thread started (poll period = %lu jiffies)\n", mmc_hostname(host), period); @@ -104,11 +105,16 @@ static int sdio_irq_thread(void *_host) ssleep(1); set_task_state(current, TASK_INTERRUPTIBLE); + if (host->caps & MMC_CAP_SDIO_IRQ) + host->ops->enable_sdio_irq(host, 1); if (!kthread_should_stop()) schedule_timeout(period); set_task_state(current, TASK_RUNNING); } while (!kthread_should_stop()); + if (host->caps & MMC_CAP_SDIO_IRQ) + host->ops->enable_sdio_irq(host, 0); + pr_debug("%s: IRQ thread exiting with code %d\n", mmc_hostname(host), ret);