summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2004-10-20 10:11:05 +0000
committersos <sos@FreeBSD.org>2004-10-20 10:11:05 +0000
commit1837c14755790024bda51266bc3c2a921e139e96 (patch)
tree2fd63f85e0795fc13eaa400fae6630373b068b5d /sys/dev/ata
parent049aec7270f8bb1e91ac2aea38148b865b11367b (diff)
downloadFreeBSD-src-1837c14755790024bda51266bc3c2a921e139e96.zip
FreeBSD-src-1837c14755790024bda51266bc3c2a921e139e96.tar.gz
Do not retry on requests that has lost thier device during reinit.
Should fix hangs on IBM's etc with the fake slave problem. MFC: asap
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-queue.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index f3bdfa3..03e3827 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -238,14 +238,11 @@ ata_completed(void *context, int dummy)
/* if we had a timeout, reinit channel and deal with the falldown */
if (request->flags & ATA_R_TIMEOUT) {
- int error = ata_reinit(ch);
-
- /* if our device disappeared return as cleanup was done already */
- if (!request->device->param)
- return;
-
- /* if reinit succeeded and retries still permit, reinject request */
- if (!error && request->retries-- > 0) {
+ /*
+ * if reinit succeeds, retries still permit and device didn't
+ * get removed by the reinit, reinject request
+ */
+ if (ata_reinit(ch) && request->retries-- > 0 && request->device->param){
request->flags &= ~(ATA_R_TIMEOUT | ATA_R_DEBUG);
request->flags |= (ATA_R_IMMEDIATE | ATA_R_REQUEUE);
ATA_DEBUG_RQ(request, "completed reinject");
OpenPOWER on IntegriCloud