diff options
author | sos <sos@FreeBSD.org> | 1999-11-26 19:26:04 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1999-11-26 19:26:04 +0000 |
commit | 68549e70151150382638c003cb68a13ad0830d62 (patch) | |
tree | 707b81e942dbe213ef1a186ab4c8865846e12210 /sys/dev | |
parent | 46311663f326e6d906368898996976d7290eb7e6 (diff) | |
download | FreeBSD-src-68549e70151150382638c003cb68a13ad0830d62.zip FreeBSD-src-68549e70151150382638c003cb68a13ad0830d62.tar.gz |
Fix atapi_wait_ready, it returned prematurely.
Less verbosity on non-fatal errors.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/atapi-all.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/ata/atapi-all.c b/sys/dev/ata/atapi-all.c index 831625a..2992e2a 100644 --- a/sys/dev/ata/atapi-all.c +++ b/sys/dev/ata/atapi-all.c @@ -471,12 +471,6 @@ op_finished: else { request->error = 0; if (request->result) { - printf("atapi: %s - %s skey=%01x asc=%02x ascq=%02x error=%02x\n", - atapi_cmd2str(atp->cmd), - atapi_skey2str(request->sense.sense_key), - request->sense.sense_key, request->sense.asc, - request->sense.ascq, request->result & ATAPI_E_MASK); - switch ((request->result & ATAPI_SK_MASK)) { case ATAPI_SK_RESERVED: printf("atapi_error: %s - timeout error = %02x\n", @@ -495,7 +489,6 @@ op_finished: break; case ATAPI_SK_NOT_READY: - atp->flags |= ATAPI_F_MEDIA_CHANGED; request->error = EBUSY; break; @@ -505,6 +498,11 @@ op_finished: break; default: + printf("atapi: %s - %s asc=%02x ascq=%02x error=%02x\n", + atapi_cmd2str(atp->cmd), + atapi_skey2str(request->sense.sense_key), + request->sense.asc, request->sense.ascq, + request->result & ATAPI_E_MASK); request->error = EIO; } } @@ -548,12 +546,8 @@ atapi_wait_ready(struct atapi_softc *atp, int32_t timeout) int32_t error = 0, timout = timeout * hz; while (timout > 0) { - error = atapi_test_ready(atp); - if ((error & ATAPI_SK_MASK) != ATAPI_SK_NOT_READY) + if ((error = atapi_test_ready(atp)) != EBUSY) break; -#ifdef ATAPI_DEBUG - printf("atapi: waiting on error=%02x\n", error); -#endif tsleep((caddr_t)&error, PRIBIO, "atpwt", 50); timout -= 50; } |