summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>1998-09-29 22:11:30 +0000
committerken <ken@FreeBSD.org>1998-09-29 22:11:30 +0000
commit124f5232aadd25f5d1a000457265b465b74839c4 (patch)
tree3ad5ebddb73183d92d722ab54fdd19354c1ad055 /sys/cam
parent12670395dc3e6a486246ece6d68884c1cf249ae4 (diff)
downloadFreeBSD-src-124f5232aadd25f5d1a000457265b465b74839c4.zip
FreeBSD-src-124f5232aadd25f5d1a000457265b465b74839c4.tar.gz
In the bootverbose case, print out error messages for all errors that will
not be retried again, even if the SF_NO_PRINT flag is set. Reviewed by: gibbs
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_all.c23
-rw-r--r--sys/cam/scsi/scsi_all.h3
2 files changed, 18 insertions, 8 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index 8d8132d..493f745 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_all.c,v 1.2 1998/09/18 22:33:59 ken Exp $
+ * $Id: scsi_all.c,v 1.3 1998/09/19 01:23:04 ken Exp $
*/
#include <sys/param.h>
@@ -124,7 +124,7 @@ static struct scsi_op_quirk_entry scsi_op_quirk_table[] = {
static struct op_table_entry scsi_op_codes[] = {
/*
* From: ftp://ftp.symbios.com/pub/standards/io/t10/drafts/spc/op-num.txt
- * Modifications by Kenneth Merry (ken@plutotech.com)
+ * Modifications by Kenneth Merry (ken@FreeBSD.ORG)
*
* Note: order is important in this table, scsi_op_desc() currently
* depends on the opcodes in the table being in order to save search time.
@@ -2052,7 +2052,10 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
scsi_extract_sense(sense, &error_code, &sense_key, &asc, &ascq);
#ifdef KERNEL
- if ((sense_flags & SF_NO_PRINT) == 0 || bootverbose)
+ if (bootverbose) {
+ sense_flags |= SF_PRINT_ALWAYS;
+ print_sense = TRUE;
+ } else if ((sense_flags & SF_NO_PRINT) == 0)
#else
if ((sense_flags & SF_NO_PRINT) == 0)
#endif
@@ -2118,7 +2121,8 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
error = 0;
break;
case SSD_KEY_ILLEGAL_REQUEST:
- if ((sense_flags & SF_QUIET_IR) != 0)
+ if (((sense_flags & SF_QUIET_IR) != 0)
+ && ((sense_flags & SF_PRINT_ALWAYS) == 0))
print_sense = FALSE;
/* FALLTHROUGH */
@@ -2133,7 +2137,8 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
error = ERESTART;
print_sense = FALSE;
} else {
- if ((error_action & SSQ_PRINT_SENSE) == 0)
+ if (((error_action & SSQ_PRINT_SENSE) == 0)
+ && ((sense_flags & SF_PRINT_ALWAYS) == 0))
print_sense = FALSE;
error = error_action & SS_ERRMASK;
@@ -2158,7 +2163,10 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
error = ERESTART;
print_sense = FALSE;
} else {
- if ((error_action & SSQ_PRINT_SENSE)==0)
+ if (((error_action &
+ SSQ_PRINT_SENSE) == 0)
+ && ((sense_flags &
+ SF_PRINT_ALWAYS) == 0))
print_sense = FALSE;
error = error_action & SS_ERRMASK;
@@ -2173,7 +2181,8 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
error = ERESTART;
print_sense = FALSE;
} else {
- if ((error_action & SSQ_PRINT_SENSE) == 0)
+ if (((error_action & SSQ_PRINT_SENSE) == 0)
+ && ((sense_flags & SF_PRINT_ALWAYS) == 0))
print_sense = FALSE;
error = error_action & SS_ERRMASK;
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index 1af5a84..3a78840 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: scsi_all.h,v 1.1 1998/09/15 06:36:34 gibbs Exp $
+ * $Id: scsi_all.h,v 1.2 1998/09/18 22:33:59 ken Exp $
*/
/*
@@ -704,6 +704,7 @@ int scsi_interpret_sense(struct cam_device *device,
#define SF_RETRY_UA 0x01
#define SF_NO_PRINT 0x02
#define SF_QUIET_IR 0x04 /* Be quiet about Illegal Request reponses */
+#define SF_PRINT_ALWAYS 0x08
const char * scsi_op_desc(u_int16_t opcode,
OpenPOWER on IntegriCloud