aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/sdio_irq.c')
-rw-r--r--drivers/mmc/core/sdio_irq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
index 01922d29241d..01daee934d16 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)
70 * asynchronous notification of pending SDIO card interrupts 70 * asynchronous notification of pending SDIO card interrupts
71 * hence we poll for them in that case. 71 * hence we poll for them in that case.
72 */ 72 */
73 period = msecs_to_jiffies(10); 73 period = (host->caps & MMC_CAP_SDIO_IRQ) ?
74 MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(10);
74 75
75 pr_debug("%s: IRQ thread started (poll period = %lu jiffies)\n", 76 pr_debug("%s: IRQ thread started (poll period = %lu jiffies)\n",
76 mmc_hostname(host), period); 77 mmc_hostname(host), period);
@@ -104,11 +105,16 @@ static int sdio_irq_thread(void *_host)
104 ssleep(1); 105 ssleep(1);
105 106
106 set_task_state(current, TASK_INTERRUPTIBLE); 107 set_task_state(current, TASK_INTERRUPTIBLE);
108 if (host->caps & MMC_CAP_SDIO_IRQ)
109 host->ops->enable_sdio_irq(host, 1);
107 if (!kthread_should_stop()) 110 if (!kthread_should_stop())
108 schedule_timeout(period); 111 schedule_timeout(period);
109 set_task_state(current, TASK_RUNNING); 112 set_task_state(current, TASK_RUNNING);
110 } while (!kthread_should_stop()); 113 } while (!kthread_should_stop());
111 114
115 if (host->caps & MMC_CAP_SDIO_IRQ)
116 host->ops->enable_sdio_irq(host, 0);
117
112 pr_debug("%s: IRQ thread exiting with code %d\n", 118 pr_debug("%s: IRQ thread exiting with code %d\n",
113 mmc_hostname(host), ret); 119 mmc_hostname(host), ret);
114 120