On Sat, 2004-01-03 at 12:52, Ged Haywood wrote:
> 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);
>       }

First, thanks for your replies.
I guess this IDE patch has been applied to the 2.6 kernel tree also?
Anyway this IDE problem wouldn't affect USB drives with scsi emulation,
would it? It seems to me that there might be a problem in the USB code
like you said Ged.

About the significant i/o to the drive;
The problem did also occur when there was no significant i/o (any i/o at
all, except filesystem writing journals, etc?) to the usb drive. However
there was a process reading filesystem information every 4th second
(df). If this could be called "significant i/o" is another question.

What shold I do next with my problem? Is this most likely a usb error in
the usb drivers or in my hardware?
-- 
Johannes H. Jensen <[EMAIL PROTECTED]>
deworks

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to