I tried this, and it didn't seem to have any effect on the problem
>
> (2) Redefine the OS_ input/output macros to introduce a short delay (udelay(1)
> perhaps) before the actual input/output instruction to see if the changed
> timing corrects the problem. Higher speed I/O access may be sampling a SCSI
> signal too soon.
This, however, seems to have done the trick for me. I have not seen any
of the errors that I was seeing before when doing my old trick of repeatedly
mounting and unmounting a cd in my SCSI CDRW Drive. I was also able to
burn a CD in the drive, which used to cause the problem as well.
I am still leaving in the code that detects more than 50 iterations
through the outher while loop in the interrupt, just to prevent a
total freeze if this problem raises it's ugly head again. Since I
don't have anything really important on the SCSI bus right now, I am
not very concerned about resetting the adapter. About the worst thing
that could happen to me in this instance would be screwing up a CDR disc.
If I had SCSI hard disks, I might be less likely to leave it in, but in
the end I think it might be a good addition to the driver to try to
detect if a "stuck in the interrupt handler" condition happens, and
try to recover from the situation.
Below is a patch to the FlashPoint.c file that just changes the OS_*
macros to add a delay. I have applied this on top of the old patch
I was using to do the "stuck in interrupt" detection.
Bill Lash
welash@xnet.com
--- orig.FlashPoint.c Sat Oct 2 23:48:26 1999
+++ FlashPoint.c Sat Oct 2 21:41:39 1999
@@ -28,12 +28,12 @@
#undef BUSTYPE_PCI
-#define OS_InPortByte(port) inb(port)
-#define OS_InPortWord(port) inw(port)
-#define OS_InPortLong(port) inl(port)
-#define OS_OutPortByte(port, value) outb(value, port)
-#define OS_OutPortWord(port, value) outw(value, port)
-#define OS_OutPortLong(port, value) outl(value, port)
+#define OS_InPortByte(port) (udelay(1),inb(port))
+#define OS_InPortWord(port) (udelay(1),inw(port))
+#define OS_InPortLong(port) (udelay(1),inl(port))
+#define OS_OutPortByte(port, value) (udelay(1),outb(value, port))
+#define OS_OutPortWord(port, value) (udelay(1),outw(value, port))
+#define OS_OutPortLong(port, value) (udelay(1),outl(value, port))
#define OS_Lock(x)
#define OS_UnLock(x)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/