summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-01-15 06:27:13 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-01-15 06:27:13 +0000
commit7ca00293fe269668390b0afce07991b5b225883e (patch)
tree68056ff098532453493c30bd48ab3a8ee3b97271 /sys
parentd6bc3496210f7d19cc39810545baa806ca318143 (diff)
Oops. Respect the various IGNORE flags when not in SCSIDEBUG mode.
Should quieten booting again. And thus ends n2k10.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/scsi_base.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index e51e6489e0b..75a9a07ce00 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.165 2010/01/15 05:50:31 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.166 2010/01/15 06:27:12 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -993,20 +993,9 @@ scsi_interpret_sense(struct scsi_xfer *xs)
#ifdef SCSIDEBUG
if (xs->sc_link->flags & SDEV_DB1)
scsi_show_mem((u_char *)&xs->sense, sizeof(xs->sense));
+ scsi_print_sense(xs);
#endif /* SCSIDEBUG */
- serr = sense->error_code & SSD_ERRCODE;
- if (serr != SSD_ERRCODE_CURRENT && serr != SSD_ERRCODE_DEFERRED)
- skey = 0xff; /* Invalid value, since key is 4 bit value. */
- else
- skey = sense->flags & SSD_KEY;
-
-#ifndef SCSIDEBUG
- /* If not SCSIDEBUG, only print sense in some cases. */
- if (skey && (xs->flags & SCSI_SILENT) == 0)
-#endif /* SCSIDEBUG */
- scsi_print_sense(xs);
-
/*
* If the device has its own error handler, call it first.
* If it returns a legit error value, return that, otherwise
@@ -1020,9 +1009,14 @@ scsi_interpret_sense(struct scsi_xfer *xs)
return (error); /* error >= 0 better ? */
}
+ /* Default sense interpretation. */
+ serr = sense->error_code & SSD_ERRCODE;
+ if (serr != SSD_ERRCODE_CURRENT && serr != SSD_ERRCODE_DEFERRED)
+ skey = 0xff; /* Invalid value, since key is 4 bit value. */
+ else
+ skey = sense->flags & SSD_KEY;
+
/*
- * Default sense interpretation.
- *
* Interpret the key/asc/ascq information where appropriate.
*/
error = 0;
@@ -1139,6 +1133,12 @@ scsi_interpret_sense(struct scsi_xfer *xs)
break;
}
+#ifndef SCSIDEBUG
+ /* SCSIDEBUG would mean it has already been printed. */
+ if (skey && (xs->flags & SCSI_SILENT) == 0)
+ scsi_print_sense(xs);
+#endif /* SCSIDEBUG */
+
return (error);
}