Clarify that Sense Key 1 is a "RECOVERED ERROR"- not just an error.

This commit is contained in:
mjacob 1998-07-11 00:52:09 +00:00
parent e7910d8d32
commit 0978d23cc4
5 changed files with 17 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: atapi_base.c,v 1.6 1998/07/01 17:16:47 mjacob Exp $ */
/* $NetBSD: atapi_base.c,v 1.7 1998/07/11 00:52:09 mjacob Exp $ */
/*
* Copyright (c) 1994, 1995, 1997 Charles M. Hannum. All rights reserved.
@ -79,7 +79,7 @@ atapi_interpret_sense(xs)
}
/* otherwise use the default */
switch (key) {
case SKEY_RECOVERABLE_ERROR:
case SKEY_RECOVERED_ERROR:
msg = "soft error (corrected)";
case SKEY_NO_SENSE:
if (xs->resid == xs->datalen)

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsi_base.c,v 1.61 1998/07/01 17:16:46 mjacob Exp $ */
/* $NetBSD: scsi_base.c,v 1.62 1998/07/11 00:52:09 mjacob Exp $ */
/*
* Copyright (c) 1994, 1995, 1997 Charles M. Hannum. All rights reserved.
@ -209,9 +209,13 @@ scsi_interpret_sense(xs)
switch (key) {
case SKEY_NO_SENSE:
case SKEY_RECOVERABLE_ERROR:
if (xs->resid == xs->datalen)
case SKEY_RECOVERED_ERROR:
if (xs->resid == xs->datalen && xs->datalen) {
/*
* Why is this here?
*/
xs->resid = 0; /* not short read */
}
case SKEY_EQUAL:
error = 0;
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsi_verbose.c,v 1.5 1998/07/10 19:37:18 mjacob Exp $ */
/* $NetBSD: scsi_verbose.c,v 1.6 1998/07/11 00:52:10 mjacob Exp $ */
/*
* Copyright (c) 1994, 1995, 1997 Charles M. Hannum. All rights reserved.
@ -49,7 +49,7 @@
static const char *sense_keys[16] = {
"No Additional Sense",
"Soft Error",
"Recovered Error",
"Not Ready",
"Media Error",
"Hardware Error",
@ -454,7 +454,7 @@ scsi_decode_sense(sinfo, flag)
(snsbuf[16] & 0xff) << 8 |
(snsbuf[17] & 0xff));
return (rqsbuf);
case SKEY_RECOVERABLE_ERROR:
case SKEY_RECOVERED_ERROR:
case SKEY_MEDIUM_ERROR:
case SKEY_HARDWARE_ERROR:
(void)sprintf(rqsbuf, "Actual Retry Count: %d",

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipi_all.h,v 1.9 1998/07/01 17:04:31 mjacob Exp $ */
/* $NetBSD: scsipi_all.h,v 1.10 1998/07/11 00:52:10 mjacob Exp $ */
/*
* SCSI and SCSI-like general interface description
@ -116,7 +116,7 @@ struct scsipi_sense_data {
};
#define SKEY_NO_SENSE 0x00
#define SKEY_RECOVERABLE_ERROR 0x01
#define SKEY_RECOVERED_ERROR 0x01
#define SKEY_NOT_READY 0x02
#define SKEY_MEDIUM_ERROR 0x03
#define SKEY_HARDWARE_ERROR 0x04

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipi_verbose.c,v 1.5 1998/07/10 19:37:18 mjacob Exp $ */
/* $NetBSD: scsipi_verbose.c,v 1.6 1998/07/11 00:52:10 mjacob Exp $ */
/*
* Copyright (c) 1994, 1995, 1997 Charles M. Hannum. All rights reserved.
@ -49,7 +49,7 @@
static const char *sense_keys[16] = {
"No Additional Sense",
"Soft Error",
"Recovered Error",
"Not Ready",
"Media Error",
"Hardware Error",
@ -454,7 +454,7 @@ scsi_decode_sense(sinfo, flag)
(snsbuf[16] & 0xff) << 8 |
(snsbuf[17] & 0xff));
return (rqsbuf);
case SKEY_RECOVERABLE_ERROR:
case SKEY_RECOVERED_ERROR:
case SKEY_MEDIUM_ERROR:
case SKEY_HARDWARE_ERROR:
(void)sprintf(rqsbuf, "Actual Retry Count: %d",