diff options
author | Aaro Koskinen <aaro.koskinen@nokia.com> | 2010-02-10 12:03:19 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 08:22:01 -0500 |
commit | 932f5d21ccd2705f1fb22e8a9e0da42013dcee17 (patch) | |
tree | 87495b482b19bb453322a233cf528c758dd4a2da /drivers/mtd/onenand | |
parent | 7d70f334ad2bf1b3aaa1f0699c0f442e14bcc9e0 (diff) |
mtd: OneNAND: do not use DMA if oops in progress
Otherwise we may hang if we are called from panic() through mtdoops.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 75f38b95811e..dfbab6c72b74 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -308,7 +308,7 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area, | |||
308 | goto out_copy; | 308 | goto out_copy; |
309 | 309 | ||
310 | /* panic_write() may be in an interrupt context */ | 310 | /* panic_write() may be in an interrupt context */ |
311 | if (in_interrupt()) | 311 | if (in_interrupt() || oops_in_progress) |
312 | goto out_copy; | 312 | goto out_copy; |
313 | 313 | ||
314 | if (buf >= high_memory) { | 314 | if (buf >= high_memory) { |
@@ -385,7 +385,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area, | |||
385 | goto out_copy; | 385 | goto out_copy; |
386 | 386 | ||
387 | /* panic_write() may be in an interrupt context */ | 387 | /* panic_write() may be in an interrupt context */ |
388 | if (in_interrupt()) | 388 | if (in_interrupt() || oops_in_progress) |
389 | goto out_copy; | 389 | goto out_copy; |
390 | 390 | ||
391 | if (buf >= high_memory) { | 391 | if (buf >= high_memory) { |