summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.h
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-07-14 12:12:38 +0200
committerChris Ball <cjb@laptop.org>2011-07-21 16:35:05 +0200
commitb9269fdd4f61aa4d185c982b0f84a3e7b7ccb4d2 (patch)
tree73cd02b34f61e71d6a4ceff5c09b78a9ba17eadb /drivers/mmc/host/tmio_mmc.h
parentmmc: Added quirks for Ricoh 1180:e823 lower base clock frequency (diff)
downloadlinux-b9269fdd4f61aa4d185c982b0f84a3e7b7ccb4d2.tar.xz
linux-b9269fdd4f61aa4d185c982b0f84a3e7b7ccb4d2.zip
mmc: tmio: fix recursive spinlock, don't schedule with interrupts disabled
Calling mmc_request_done() under a spinlock with interrupts disabled leads to a recursive spin-lock on request retry path and to scheduling in atomic context. This patch fixes both these problems by moving mmc_request_done() to the scheduler workqueue. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
-rw-r--r--drivers/mmc/host/tmio_mmc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 211ef6e7a820..f0d7c4349793 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -18,6 +18,7 @@
#include <linux/highmem.h>
#include <linux/mmc/tmio.h>
+#include <linux/mutex.h>
#include <linux/pagemap.h>
#include <linux/spinlock.h>
@@ -73,8 +74,11 @@ struct tmio_mmc_host {
/* Track lost interrupts */
struct delayed_work delayed_reset_work;
- spinlock_t lock;
+ struct work_struct done;
+
+ spinlock_t lock; /* protect host private data */
unsigned long last_req_ts;
+ struct mutex ios_lock; /* protect set_ios() context */
};
int tmio_mmc_host_probe(struct tmio_mmc_host **host,