Date: Sun, 13 Aug 2000 04:32:56 -0700 (PDT) From: <sos@FreeBSD.org> To: Cy.Schubert@uumail.gov.bc.ca, sos@FreeBSD.org, freebsd-bugs@FreeBSD.org, sos@FreeBSD.org Subject: Re: kern/20573: ATA MFC Breaks -STABL Message-ID: <200008131132.EAA20386@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
Synopsis: ATA MFC Breaks -STABL
State-Changed-From-To: open->analyzed
State-Changed-By: sos
State-Changed-When: Sun Aug 13 04:29:57 PDT 2000
State-Changed-Why:
I'm the ATA guy :)
Please try the following patch it should help:
Index: ata-disk.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
retrieving revision 1.73
diff -u -r1.73 ata-disk.c
--- ata-disk.c 2000/08/06 18:01:47 1.73
+++ ata-disk.c 2000/08/13 11:25:21
@@ -391,7 +391,7 @@
if (ata_command(adp->controller, adp->unit, cmd,
cylinder, head, sector, count, 0, ATA_IMMEDIATE)) {
- printf("ad%d: error executing command\n", adp->lun);
+ printf("ad%d: error executing command", adp->lun);
goto transfer_failed;
}
@@ -429,12 +429,21 @@
transfer_failed:
untimeout((timeout_t *)ad_timeout, request, request->timeout_handle);
- request->bp->bio_error = EIO;
- request->bp->bio_flags |= BIO_ERROR;
- request->bp->bio_resid = request->bytecount;
- devstat_end_transaction_bio(&adp->stats, request->bp);
- biodone(request->bp);
- free(request, M_AD);
+ printf(" - resetting\n");
+
+ /* if retries still permit, reinject this request */
+ if (request->retries++ < AD_MAX_RETRIES)
+ TAILQ_INSERT_HEAD(&adp->controller->ata_queue, request, chain);
+ else {
+ /* retries all used up, return error */
+ request->bp->bio_error = EIO;
+ request->bp->bio_flags |= BIO_ERROR;
+ request->bp->bio_resid = request->bytecount;
+ devstat_end_transaction_bio(&adp->stats, request->bp);
+ biodone(request->bp);
+ free(request, M_AD);
+ }
+ ata_reinit(adp->controller);
}
int32_t
Responsible-Changed-From-To: freebsd-bugs->sos
Responsible-Changed-By: sos
Responsible-Changed-When: Sun Aug 13 04:29:57 PDT 2000
Responsible-Changed-Why:
http://www.freebsd.org/cgi/query-pr.cgi?pr=20573
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008131132.EAA20386>
