Hello all,

On Fri, 2 Jan 2004, Patrick Bennett wrote:

> >Now, this has happened many times now, on both 2.4 and 2.6 kernels: Suddenly
> >the hard-drive is not responding from my computer. ... cannot access the drive.
> 
> I have experience with this basic scenario happening on several 
> different machines.... my best guess as the the conditions that cause it 
> are seperate simultaneous processes that generate significant i/o to the 
> usb drive.

This is interesting.  Recently I went through some serious pain with a
very similar issue on the IDE drives on one of my machines.  The SCSI
drives on the same machine were fine.  It only seemed to happen during
PIO transfers and under heavy loads although I suspect that using DMA
simply makes evidence of the problem rarer.  A patch recently applied
to the 2.4 BK kernel tree allegedly fixes the problem in the IDE code,
but I haven't been able to test it on my server yet.

I wonder if there's a similar problem in the USB code?

73,
Ged.


===== drivers/ide/ide-iops.c 1.7 vs 1.9 =====
--- 1.7/drivers/ide/ide-iops.c  Sat Aug  9 11:48:39 2003
+++ 1.9/drivers/ide/ide-iops.c  Sun Dec 28 18:14:05 2003
@@ -664,12 +664,22 @@
        if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
                local_irq_set(flags);
                timeout += jiffies;
-               while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
+               stat = hwif->INB(IDE_STATUS_REG);
+               while (stat & BUSY_STAT) {
                        if (time_after(jiffies, timeout)) {
-                               local_irq_restore(flags);
-                               *startstop = DRIVER(drive)->error(drive, "status 
timeout", stat);
-                               return 1;
+                               /*
+                                * do one more status read in case we were interrupted 
between last
+                                * stat = hwif->INB(IDE_STATUS_REG) and 
time_after(jiffies, timeout)
+                                * in wich case the timeout might have been shorter 
than specified.
+                                */
+                               if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
+                                       local_irq_restore(flags);
+                                       *startstop = DRIVER(drive)->error(drive, 
"status timeout", stat);
+                                       return 1;
+                               }
                        }
+                       else
+                               stat = hwif->INB(IDE_STATUS_REG);
                }
                local_irq_restore(flags);
        }




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to