summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2002-06-05 19:05:01 +0000
committergibbs <gibbs@FreeBSD.org>2002-06-05 19:05:01 +0000
commitaefa498e63c658a882eb8df7fa95d5591e18bceb (patch)
tree361a620dd0c4c1bbb225c62769a7ef197ec3718c /sys/cam
parent44914f90a824ec129ab0e201e9856aff505f4841 (diff)
downloadFreeBSD-src-aefa498e63c658a882eb8df7fa95d5591e18bceb.zip
FreeBSD-src-aefa498e63c658a882eb8df7fa95d5591e18bceb.tar.gz
scsi_message.h:
Include PPR option bits defined in SPI4. scsi_iu.h: Add data structures releated to parallel SCSI information units for use in SPI4 packetized protocol.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_iu.h32
-rw-r--r--sys/cam/scsi/scsi_message.h17
2 files changed, 43 insertions, 6 deletions
diff --git a/sys/cam/scsi/scsi_iu.h b/sys/cam/scsi/scsi_iu.h
new file mode 100644
index 0000000..206f3f4
--- /dev/null
+++ b/sys/cam/scsi/scsi_iu.h
@@ -0,0 +1,32 @@
+/*
+ * This file is in the public domain.
+ * $FreeBSD$
+ */
+#ifndef _SCSI_SCSI_IU_H
+#define _SCSI_SCSI_IU_H 1
+
+struct scsi_status_iu_header
+{
+ u_int8_t reserved[2];
+ u_int8_t flags;
+#define SIU_SNSVALID 0x2
+#define SIU_RSPVALID 0x1
+ u_int8_t status;
+ u_int8_t sense_length[4];
+ u_int8_t pkt_failures_length[4];
+ u_int8_t pkt_failures[1];
+};
+
+#define SIU_PKTFAIL_OFFSET(siu) 12
+#define SIU_PKTFAIL_CODE(siu) (scsi_4btoul((siu)->pkt_failures) & 0xFF)
+#define SIU_PFC_NONE 0
+#define SIU_PFC_CIU_FIELDS_INVALID 2
+#define SIU_PFC_TMF_NOT_SUPPORTED 4
+#define SIU_PFC_TMF_FAILED 5
+#define SIU_PFC_INVALID_TYPE_CODE 6
+#define SIU_PFC_ILLEGAL_REQUEST 7
+#define SIU_SENSE_OFFSET(siu) \
+ (12 + (((siu)->flags & SIU_RSPVALID) \
+ ? scsi_4btoul((siu)->pkt_failures_length) \
+ : 0))
+#endif /*_SCSI_SCSI_IU_H*/
diff --git a/sys/cam/scsi/scsi_message.h b/sys/cam/scsi/scsi_message.h
index cd759f1..85dc4cb 100644
--- a/sys/cam/scsi/scsi_message.h
+++ b/sys/cam/scsi/scsi_message.h
@@ -17,7 +17,7 @@
#define MSG_NOOP 0x08 /* M/M */
#define MSG_PARITY_ERROR 0x09 /* M/M */
#define MSG_LINK_CMD_COMPLETE 0x0a /* O/O */
-#define MSG_LINK_CMD_COMPLETEF 0x0b /* O/O */
+#define MSG_LINK_CMD_COMPLETEF 0x0b /* O/O */ /* Obsolete */
#define MSG_BUS_DEV_RESET 0x0c /* O/M */
#define MSG_TARGET_RESET 0x0c /* O/M */ /* SPI3 Terminology */
#define MSG_ABORT_TAG 0x0d /* O/O */
@@ -58,8 +58,13 @@
#define MSG_EXT_WDTR_BUS_16_BIT 0x01
#define MSG_EXT_WDTR_BUS_32_BIT 0x02 /* Deprecated in SPI3 */
-#define MSG_EXT_PPR 0x04 /* SPI3 */
-#define MSG_EXT_PPR_LEN 0x06
-#define MSG_EXT_PPR_QAS_REQ 0x04
-#define MSG_EXT_PPR_DT_REQ 0x02
-#define MSG_EXT_PPR_IU_REQ 0x01
+#define MSG_EXT_PPR 0x04 /* SPI3/SPI4 */
+#define MSG_EXT_PPR_LEN 0x06
+#define MSG_EXT_PPR_PCOMP_EN 0x80
+#define MSG_EXT_PPR_RTI 0x40
+#define MSG_EXT_PPR_RD_STRM 0x20
+#define MSG_EXT_PPR_WR_FLOW 0x10
+#define MSG_EXT_PPR_HOLD_MCS 0x08
+#define MSG_EXT_PPR_QAS_REQ 0x04
+#define MSG_EXT_PPR_DT_REQ 0x02
+#define MSG_EXT_PPR_IU_REQ 0x01
OpenPOWER on IntegriCloud