diff options
author | Matt Jacob <mjacob@FreeBSD.org> | 2006-05-30 22:44:00 +0000 |
---|---|---|
committer | Matt Jacob <mjacob@FreeBSD.org> | 2006-05-30 22:44:00 +0000 |
commit | 4e359f5ad117c485c481f1c0519dddd976803139 (patch) | |
tree | 6614eeb1f8a49a4cf6688996794e5850d915ecb8 /sys/cam/scsi/scsi_all.h | |
parent | 8cb2906936eedc91f8306ed8fbe95a874c27c96f (diff) | |
download | src-4e359f5ad117c485c481f1c0519dddd976803139.tar.gz src-4e359f5ad117c485c481f1c0519dddd976803139.zip |
Handle some of the inquiry flags that have come into
usage as of SPC2r20. Specifically, handle the BQueue
flag which will indicate that a device supports the
Basic Queueing model (no Head of Queue or Ordered tags).
When this flag is set, SID_CmdQueue is clear. This has
causes FreeBSD to assume that the device did not support
tagged operations.
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=159086
Diffstat (limited to 'sys/cam/scsi/scsi_all.h')
-rw-r--r-- | sys/cam/scsi/scsi_all.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index 02cfd186a649..33b26de83dc4 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -599,7 +599,19 @@ struct scsi_inquiry_data #define SID_AENC 0x80 #define SID_TrmIOP 0x40 u_int8_t additional_length; - u_int8_t reserved[2]; + u_int8_t reserved; + u_int8_t spc2_flags; +#define SPC2_SID_MChngr 0x08 +#define SPC2_SID_MultiP 0x10 +#define SPC2_SID_EncServ 0x40 +#define SPC2_SID_BQueue 0x80 + +#define INQ_DATA_TQ_ENABLED(iqd) \ + ((SID_ANSI_REV(iqd) < SCSI_REV_SPC2)? ((iqd)->flags & SID_CmdQue) : \ + (((iqd)->flags & SID_CmdQue) && !((iqd)->spc2_flags & SPC2_SID_BQueue)) || \ + (!((iqd)->flags & SID_CmdQue) && ((iqd)->spc2_flags & SPC2_SID_BQueue))) + + u_int8_t flags; #define SID_SftRe 0x01 #define SID_CmdQue 0x02 |