[patch 12/33] m68k: make Atari IDE lock reentrant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From Roman Zippel <[email protected]>

Make the Atari IDE lock reentrant, as the new request is started in the
interrupt before the last one is completely released.

Signed-off-by: Roman Zippel <[email protected]>
---
 include/asm-m68k/ide.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-m68k-2.6.21.orig/include/asm-m68k/ide.h
+++ linux-m68k-2.6.21/include/asm-m68k/ide.h
@@ -117,8 +117,8 @@ static __inline__ void ide_release_lock 
 			printk("ide_release_lock: bug\n");
 			return;
 		}
-		falconide_intr_lock = 0;
-		stdma_release();
+		if (!--falconide_intr_lock)
+			stdma_release();
 	}
 }
 
@@ -126,12 +126,12 @@ static __inline__ void
 ide_get_lock(irq_handler_t handler, void *data)
 {
 	if (MACH_IS_ATARI) {
-		if (falconide_intr_lock == 0) {
+		if (!falconide_intr_lock) {
 			if (in_interrupt() > 0)
 				panic( "Falcon IDE hasn't ST-DMA lock in interrupt" );
 			stdma_lock(handler, data);
-			falconide_intr_lock = 1;
 		}
+		falconide_intr_lock++;
 	}
 }
 #endif /* CONFIG_BLK_DEV_FALCON_IDE */

--
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux