Messages in this thread | | | Date | Tue, 30 Dec 2003 09:10:53 -0200 (BRST) | From | Marcelo Tosatti <> | Subject | PATCH: IDE: no DRQ after issuing WRITE (fwd) |
| |
Hi Bart, Andrew,
The above patch is required to fix a "race" in ide_wait_stat().
It doesnt seem to be in 2.6 yet.
On Thu, 18 Dec 2003, Bartlomiej Zolnierkiewicz wrote:
> > Thanks Marcelo. Patch looks okay. > > On Thursday 18 of December 2003 14:34, Marcelo Tosatti wrote: > > FYI > > > > ---------- Forwarded message ---------- > > Date: Mon, 15 Dec 2003 20:02:08 +0100 > > From: Daniel Tram Lux <daniel@starbattle.com> > > To: linux-kernel@vger.kernel.org > > Subject: [2.4.23][patch]no DRQ after issuing WRITE > > > > Hi, > > > > basically same patch as for 2.6.0-test 11 > > > > against following problem: > > > > hda: no DRQ after issuing WRITE > > ide0: reset: success > > hda: status timeout: status=0xd0 { Busy } > > > > Regards > > Daniel Lux > > > > --- linux-2.4.23.org/drivers/ide/ide-iops.c 2003-12-15 > > 14:32:39.000000000 +0100 +++ linux-2.4.23/drivers/ide/ide-iops.c 2003-12-15 > > 19:55:33.000000000 +0100 @@ -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); > > } > - 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/
| |