blob: f632f831f7f56d573630c88cc1f6dfd46479bffe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
Subject: [PATCH] m68k: make Atari IDE lock reentrant
From Roman Zippel <zippel@linux-m68k.org>
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 <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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 */
|