diff options
Diffstat (limited to 'drivers/mmc/core/sdio_irq.c')
-rw-r--r-- | drivers/mmc/core/sdio_irq.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index c292e124107a..bb192f90e8e9 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * Created: June 18, 2007 | 5 | * Created: June 18, 2007 |
6 | * Copyright: MontaVista Software Inc. | 6 | * Copyright: MontaVista Software Inc. |
7 | * | 7 | * |
8 | * Copyright 2008 Pierre Ossman | ||
9 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or (at | 12 | * the Free Software Foundation; either version 2 of the License, or (at |
@@ -107,11 +109,14 @@ static int sdio_irq_thread(void *_host) | |||
107 | 109 | ||
108 | /* | 110 | /* |
109 | * Give other threads a chance to run in the presence of | 111 | * Give other threads a chance to run in the presence of |
110 | * errors. FIXME: determine if due to card removal and | 112 | * errors. |
111 | * possibly exit this thread if so. | ||
112 | */ | 113 | */ |
113 | if (ret < 0) | 114 | if (ret < 0) { |
114 | ssleep(1); | 115 | set_current_state(TASK_INTERRUPTIBLE); |
116 | if (!kthread_should_stop()) | ||
117 | schedule_timeout(HZ); | ||
118 | set_current_state(TASK_RUNNING); | ||
119 | } | ||
115 | 120 | ||
116 | /* | 121 | /* |
117 | * Adaptive polling frequency based on the assumption | 122 | * Adaptive polling frequency based on the assumption |
@@ -154,7 +159,8 @@ static int sdio_card_irq_get(struct mmc_card *card) | |||
154 | if (!host->sdio_irqs++) { | 159 | if (!host->sdio_irqs++) { |
155 | atomic_set(&host->sdio_irq_thread_abort, 0); | 160 | atomic_set(&host->sdio_irq_thread_abort, 0); |
156 | host->sdio_irq_thread = | 161 | host->sdio_irq_thread = |
157 | kthread_run(sdio_irq_thread, host, "ksdiorqd"); | 162 | kthread_run(sdio_irq_thread, host, "ksdioirqd/%s", |
163 | mmc_hostname(host)); | ||
158 | if (IS_ERR(host->sdio_irq_thread)) { | 164 | if (IS_ERR(host->sdio_irq_thread)) { |
159 | int err = PTR_ERR(host->sdio_irq_thread); | 165 | int err = PTR_ERR(host->sdio_irq_thread); |
160 | host->sdio_irqs--; | 166 | host->sdio_irqs--; |