From: Daniel Tram Lux <daniel@starbattle.com>
To: linux-kernel@vger.kernel.org
Subject: [2.6.0-test11][patch] no DRQ after issuing WRITE
Date: Mon, 15 Dec 2003 19:52:47 +0100 [thread overview]
Message-ID: <20031215185247.GA801@starbattle.com> (raw)
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);
}
reply other threads:[~2003-12-15 18:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031215185247.GA801@starbattle.com \
--to=daniel@starbattle.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox