Re: Linux 2.5.67-ac2: ide reset issue

From: rain.wang (rain.wang@mic.com.tw)
Date: Fri Apr 18 2003 - 00:59:28 EST


Hi,
    I tested 2.5.67-ac2 with two continuous drive reset call,
dmesged out oops messages as below. system didn't crash
like under 2.4.21-pre1-ac1, but that race still exist.
    oops message:

hda: DMA disabled
------------[ cut here ]------------
kernel BUG at drivers/ide/ide.c:1603!
invalid operand: 0000 [#1]
CPU: 0
EIP: 0060:[<c0216ac1>] Not tainted
EFLAGS: 00010082
EIP is at generic_ide_ioctl+0x471/0x860
eax: c7e8ee60 ebx: 00000202 ecx: c038be8c edx: c0211d10
esi: c02ba3cb edi: c038be8c ebp: c781df58 esp: c781df0c
ds: 007b es: 007b ss: 0068
Process hdparm (pid: 203, threadinfo=c781c000 task=c7bd06a0)
Stack: c7dc21c0 c122f3e0 08049cf4 00000000 00000000 08049cf4 c122f3e0 c7dc6000
       3e9f6c00 00030002
Call Trace:
 [<c0201af2>] blkdev_ioctl+0x82/0x3cc
 [<c0151d41>] sys_ioctl+0x81/0x220
 [<c0142d13>] sys_write+0x33/0x40
 [<c01090e3>] syscall_call+0x7/0xb

Code: 0f 0b 43 06 0a a3 2b c0 c7 40 08 01 00 00 00 53 9d 57 e8 a8
 ide0: reset: success

    I don't know if there's enough reason to change reset semantics
now to wait for completion, so that the next call be free of race.
and I once had a simpler fix to let it delay another 50ms, that works
on my box but seems not a thorough one. does it help?

Regards
rain.w


--- /usr/src/linux-2.5.67-ac2/drivers/ide/ide.c Fri Apr 18 10:11:01 2003
+++ ide.c Fri Apr 18 11:14:26 2003
@@ -1608,6 +1608,10 @@
                         HWGROUP(drive)->busy = 1;
                         spin_unlock_irqrestore(&ide_lock, flags);
                         (void) ide_do_reset(drive);
+
+ /* wait for another 50ms */
+ mdelay(50);
+
                         if (drive->suspend_reset) {
 /*
  * APM WAKE UP todo !!

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



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:23 EST