summaryrefslogtreecommitdiff
path: root/sys/scsi/st.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-08-22 04:43:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-08-22 04:43:28 +0000
commit019f161f4d8dcef738321fbe602f155dda8c6897 (patch)
treee387d1a3b22e2a437029ac0c12650aa1fe67022d /sys/scsi/st.c
parentcfc70b6000a16bbe3322355941f522e2f68a64e9 (diff)
Add more detailed SCSI error printing by Matthew Jacob. Enabled by
default. Use "option SCSIVERBOSE=0" to turn off (only added 8Kb to my kernel). From the NetBSD commit message: Add in more detailed SCSI error printing, based off of final SCSI-2 spec. This will also print out things like progress indicator errors, and will also dump out additional sense bytes that haven't been decoded.
Diffstat (limited to 'sys/scsi/st.c')
-rw-r--r--sys/scsi/st.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 20cecf254f1..cbd739f228c 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.18 1997/08/19 03:50:59 dgregor Exp $ */
+/* $OpenBSD: st.c,v 1.19 1997/08/22 04:43:27 millert Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -1733,6 +1733,10 @@ st_interpret_sense(xs)
info = xs->datalen; /* bad choice if fixed blocks */
if ((sense->error_code & SSD_ERRCODE) != 0x70)
return -1; /* let the generic code handle it */
+#if SCSIVERBOSE
+ else
+ scsi_print_sense(xs, 0); /* tell folks what happened */
+#endif
if (st->flags & ST_FIXEDBLOCKS) {
xs->resid = info * st->blksize;
if (sense->flags & SSD_EOM) {