summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_all.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/scsi/scsi_all.h')
-rw-r--r--sys/scsi/scsi_all.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h
index 60f45cd52a5..8afc49003a7 100644
--- a/sys/scsi/scsi_all.h
+++ b/sys/scsi/scsi_all.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_all.h,v 1.37 2006/07/29 02:52:49 krw Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.38 2006/11/27 18:24:43 beck Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
@@ -313,6 +313,40 @@ struct scsi_sense_data {
#define SKEY_MISCOMPARE 0x0E
#define SKEY_RESERVED 0x0F
+
+/* Additional sense code info */
+#define ASC_ASCQ(ssd) ((ssd->add_sense_code << 8) | ssd->add_sense_code_qual)
+
+#define SENSE_NOT_READY_BECOMING_READY 0x0401
+#define SENSE_NOT_READY_FORMAT 0x0404
+#define SENSE_NOT_READY_REBUILD 0x0405
+#define SENSE_NOT_READY_RECALC 0x0406
+#define SENSE_NOT_READY_INPROGRESS 0x0407
+#define SENSE_NOT_READY_LONGWRITE 0x0408
+#define SENSE_NOT_READY_SELFTEST 0x0409
+#define SENSE_POWER_RESET_OR_BUS 0x2900
+#define SENSE_POWER_ON 0x2901
+#define SENSE_BUS_RESET 0x2902
+#define SENSE_BUS_DEVICE_RESET 0x2903
+#define SENSE_DEVICE_INTERNAL_RESET 0x2904
+#define SENSE_TSC_CHANGE_SE 0x2905
+#define SENSE_TSC_CHANGE_LVD 0x2906
+#define SENSE_IT_NEXUS_LOSS 0x2907
+#define SENSE_BAD_MEDIUM 0x3000
+#define SENSE_NR_MEDIUM_UNKNOWN_FORMAT 0x3001
+#define SENSE_NR_MEDIUM_INCOMPATIBLE_FORMAT 0x3002
+#define SENSE_NW_MEDIUM_UNKNOWN_FORMAT 0x3004
+#define SENSE_NW_MEDIUM_INCOMPATIBLE_FORMAT 0x3005
+#define SENSE_NF_MEDIUM_INCOMPATIBLE_FORMAT 0x3006
+#define SENSE_NW_MEDIUM_AC_MISMATCH 0x3008
+#define SENSE_NOMEDIUM 0x3A00
+#define SENSE_NOMEDIUM_TCLOSED 0x3A01
+#define SENSE_NOMEDIUM_TOPEN 0x3A02
+#define SENSE_NOMEDIUM_LOADABLE 0x3A03
+#define SENSE_NOMEDIUM_AUXMEM 0x3A04
+#define SENSE_CARTRIDGE_FAULT 0x5200
+#define SENSE_MEDIUM_REMOVAL_PREVENTED 0x5302
+
struct scsi_blk_desc {
u_int8_t density;
u_int8_t nblocks[3];