All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OneNAND: OMAP: do not use DMA if oops in progress
@ 2010-02-10 17:03 Aaro.Koskinen
  2010-02-16  8:12 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Aaro.Koskinen @ 2010-02-10 17:03 UTC (permalink / raw)
  To: linux-mtd; +Cc: Artem.Bityutskiy, adrian.hunter

From: Aaro Koskinen <aaro.koskinen@nokia.com>

Otherwise we may hang if we are called from panic() through mtdoops.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 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 75f38b9..dfbab6c 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,
 		goto out_copy;
 
 	/* panic_write() may be in an interrupt context */
-	if (in_interrupt())
+	if (in_interrupt() || oops_in_progress)
 		goto out_copy;
 
 	if (buf >= high_memory) {
@@ -385,7 +385,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area,
 		goto out_copy;
 
 	/* panic_write() may be in an interrupt context */
-	if (in_interrupt())
+	if (in_interrupt() || oops_in_progress)
 		goto out_copy;
 
 	if (buf >= high_memory) {
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] OneNAND: OMAP: do not use DMA if oops in progress
  2010-02-10 17:03 [PATCH] OneNAND: OMAP: do not use DMA if oops in progress Aaro.Koskinen
@ 2010-02-16  8:12 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-02-16  8:12 UTC (permalink / raw)
  To: Aaro.Koskinen; +Cc: linux-mtd, adrian.hunter

On Wed, 2010-02-10 at 19:03 +0200, Aaro.Koskinen@nokia.com wrote:
> From: Aaro Koskinen <aaro.koskinen@nokia.com>
> 
> Otherwise we may hang if we are called from panic() through mtdoops.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>

Pushed to my l2-mtd-2.6.git / master.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-16  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-10 17:03 [PATCH] OneNAND: OMAP: do not use DMA if oops in progress Aaro.Koskinen
2010-02-16  8:12 ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.