diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2006-11-27 18:24:44 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2006-11-27 18:24:44 +0000 |
commit | 99c759cf94d99e7cd02f6c3ea2afa67f31d4e728 (patch) | |
tree | 879e7643280a845f27692558dd7311201cdf4935 /sys/scsi/scsi_all.h | |
parent | 75f8a5de58263b14e936d1dfbac6861eade5ebb9 (diff) |
rework asc/ascq handling to get rid of "magic" 0x values in the code, changes
asc/ascq handling to deal with the pair together rather than seperately, since
modern scsi has long since polluted the "categories" of asc enough that you
pretty much need to always look as ascq.
ok krw@ deraadt@, dlg@
Diffstat (limited to 'sys/scsi/scsi_all.h')
-rw-r--r-- | sys/scsi/scsi_all.h | 36 |
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]; |