* [2.6.0-test11][patch] no DRQ after issuing WRITE
@ 2003-12-15 18:52 Daniel Tram Lux
0 siblings, 0 replies; only message in thread
From: Daniel Tram Lux @ 2003-12-15 18:52 UTC (permalink / raw)
To: linux-kernel
Hi,
I had the following problem:
hda: no DRQ after issuing WRITE
ide0: reset: success
hda: status timeout: status=0xd0 { Busy }
hda: no DRQ after issuing WRITE
ide0: reset: success
the following patch cured this problem...
Regards
Daniel Lux
--- linux-2.6.0-test11.org/drivers/ide/ide-iops.c 2003-10-08 21:24:04.000000000 +0200
+++ linux-2.6.0-test11/drivers/ide/ide-iops.c 2003-12-15 19:36:02.000000000 +0100
@@ -645,12 +645,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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-15 18:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-15 18:52 [2.6.0-test11][patch] no DRQ after issuing WRITE Daniel Tram Lux
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.