diff options
author | mav <mav@FreeBSD.org> | 2015-02-15 08:52:09 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-02-15 08:52:09 +0000 |
commit | a131bc6ccdd1f9d3b2eb1a0eba12db36da29b906 (patch) | |
tree | e49ea77ff034d65ac4ee39e423f14d5e6a527747 /sys/cam/scsi/scsi_all.h | |
parent | 091e4e720c8d1dabbd7e515b4450a35f8a31b01d (diff) | |
download | FreeBSD-src-a131bc6ccdd1f9d3b2eb1a0eba12db36da29b906.zip FreeBSD-src-a131bc6ccdd1f9d3b2eb1a0eba12db36da29b906.tar.gz |
MFC r277917 (by ken), r278598:
Improve SCSI Extended Inquiry VPD page (0x86) support.
sys/cam/scsi/scsi_all.h:
In struct scsi_extended_inquiry_data:
- Increase the length field to 2 bytes, as it is 2 bytes in SPC-4.
- Add bit definitions for the various Activiate Microcode actions.
- Add the Sequential Access Logical Block Protection support bit,
since we need that in the sa(4) driver. (For modifications
that will come later.)
- Add definitions for the various Multi I_T Nexus Microcode
Download modes.
sys/cam/ctl/ctl.c:
As of SPC-4, a single report of "REPORTED LUNS DATA HAS CHANGED"
is to be given per I_T nexus. Once it is reported, the unit
attention condition should be cleared for all LUNS attached to
an I_T nexus.
Previously that only happened when a REPORT LUNS command was
processed.
This behavior may be different (according to SAM-5) when the
UA_INTLCK_CTRL bits are non-zero in the control mode page but
CTL does not currently support that.
So, in view of the spec, whenever we report a LUN inventory
change unit attention, clear it on all LUNs for that
particular I_T nexus.
Add a new function, ctl_clear_ua() that will clear a unit
attention on all LUNs for the given I_T nexus.
One field in the extended inquiry data that we could potentially
report at some point is the maximum supported sense data length.
To do that, we would the SIM to report (via path inquiry
perhaps) how much sense data it is able to send.
Add comments to explain some of the bits that are set in the
Extended Inquiry VPD page.
Add a few comments to make it more clear which functions handle
various VPD pages.
Diffstat (limited to 'sys/cam/scsi/scsi_all.h')
-rw-r--r-- | sys/cam/scsi/scsi_all.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index d536a74..dfd0db0 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -2112,10 +2112,15 @@ struct scsi_vpd_extended_inquiry_data uint8_t device; uint8_t page_code; #define SVPD_EXTENDED_INQUIRY_DATA 0x86 - uint8_t reserved; - uint8_t page_length; + uint8_t page_length[2]; uint8_t flags1; -#define SVPD_EID_AM 0xC0 + + /* These values are for direct access devices */ +#define SVPD_EID_AM_MASK 0xC0 +#define SVPD_EID_AM_DEFER 0x80 +#define SVPD_EID_AM_IMMED 0x40 +#define SVPD_EID_AM_UNDEFINED 0x00 +#define SVPD_EID_AM_RESERVED 0xc0 #define SVPD_EID_SPT 0x38 #define SVPD_EID_SPT_1 0x00 #define SVPD_EID_SPT_12 0x08 @@ -2124,9 +2129,14 @@ struct scsi_vpd_extended_inquiry_data #define SVPD_EID_SPT_3 0x20 #define SVPD_EID_SPT_23 0x28 #define SVPD_EID_SPT_123 0x38 + + /* These values are for sequential access devices */ +#define SVPD_EID_SA_SPT_LBP 0x08 + #define SVPD_EID_GRD_CHK 0x04 #define SVPD_EID_APP_CHK 0x02 #define SVPD_EID_REF_CHK 0x01 + uint8_t flags2; #define SVPD_EID_UASK_SUP 0x20 #define SVPD_EID_GROUP_SUP 0x10 @@ -2147,6 +2157,10 @@ struct scsi_vpd_extended_inquiry_data #define SVPD_EID_CBCS 0x01 uint8_t flags6; #define SVPD_EID_MULTI_I_T_FW 0x0F +#define SVPD_EID_MC_VENDOR_SPEC 0x00 +#define SVPD_EID_MC_MODE_1 0x01 +#define SVPD_EID_MC_MODE_2 0x02 +#define SVPD_EID_MC_MODE_3 0x03 uint8_t est[2]; uint8_t flags7; #define SVPD_EID_POA_SUP 0x80 |