From 0978d23cc45a9f4a8edecd6a87f12b9a51b3e8be Mon Sep 17 00:00:00 2001 From: mjacob Date: Sat, 11 Jul 1998 00:52:09 +0000 Subject: [PATCH] Clarify that Sense Key 1 is a "RECOVERED ERROR"- not just an error. --- sys/dev/scsipi/atapi_base.c | 4 ++-- sys/dev/scsipi/scsi_base.c | 10 +++++++--- sys/dev/scsipi/scsi_verbose.c | 6 +++--- sys/dev/scsipi/scsipi_all.h | 4 ++-- sys/dev/scsipi/scsipi_verbose.c | 6 +++--- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/sys/dev/scsipi/atapi_base.c b/sys/dev/scsipi/atapi_base.c index 14bdd166acbb..8bd83ea728ad 100644 --- a/sys/dev/scsipi/atapi_base.c +++ b/sys/dev/scsipi/atapi_base.c @@ -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) diff --git a/sys/dev/scsipi/scsi_base.c b/sys/dev/scsipi/scsi_base.c index ba3148fb6c58..44116e85d62c 100644 --- a/sys/dev/scsipi/scsi_base.c +++ b/sys/dev/scsipi/scsi_base.c @@ -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; diff --git a/sys/dev/scsipi/scsi_verbose.c b/sys/dev/scsipi/scsi_verbose.c index 554cb0253292..8fd5f4d1bee7 100644 --- a/sys/dev/scsipi/scsi_verbose.c +++ b/sys/dev/scsipi/scsi_verbose.c @@ -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", diff --git a/sys/dev/scsipi/scsipi_all.h b/sys/dev/scsipi/scsipi_all.h index 06cfe9e8282a..d34c3d381b48 100644 --- a/sys/dev/scsipi/scsipi_all.h +++ b/sys/dev/scsipi/scsipi_all.h @@ -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 diff --git a/sys/dev/scsipi/scsipi_verbose.c b/sys/dev/scsipi/scsipi_verbose.c index be98dd3f8247..2dcee05ebd2a 100644 --- a/sys/dev/scsipi/scsipi_verbose.c +++ b/sys/dev/scsipi/scsipi_verbose.c @@ -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",