Some ATAPI CD occasionally reports "ATA illegal indication length" for

a request sense command, but the sense is properly transfered anyway.
Ignore the error for this case.
This commit is contained in:
bouyer 2001-06-27 13:22:36 +00:00
parent 4fadc33006
commit 6a91469e6d
1 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: atapi_wdc.c,v 1.42 2001/06/13 18:17:41 bjh21 Exp $ */
/* $NetBSD: atapi_wdc.c,v 1.43 2001/06/27 13:22:36 bouyer Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@ -754,7 +754,15 @@ again:
xfer->c_bcount -= sc_xfer->datalen;
}
sc_xfer->resid = xfer->c_bcount;
if (chp->ch_status & WDCS_ERR) {
/*
* Some drive occasionally set WDCS_ERR with
* "ATA illegal length indication" in the error
* register. If we read some data the sense is valid
* anyway, so don't report the error.
*/
if (chp->ch_status & WDCS_ERR &&
((sc_xfer->xs_control & XS_CTL_REQSENSE) == 0 ||
sc_xfer->resid == sc_xfer->datalen)) {
/* save the short sense */
sc_xfer->error = XS_SHORTSENSE;
sc_xfer->sense.atapi_sense = chp->ch_error;