summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_all.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2017-01-05 11:23:55 +0000
committermav <mav@FreeBSD.org>2017-01-05 11:23:55 +0000
commit2621e2015c9066b5045f64d90118a330a3eef351 (patch)
tree8b2c7520daea237ecd4af91b18ea08197c791afc /sys/cam/scsi/scsi_all.h
parent1c1403739d6bf57d5577c219d683a752d0cb9c4d (diff)
downloadFreeBSD-src-2621e2015c9066b5045f64d90118a330a3eef351.zip
FreeBSD-src-2621e2015c9066b5045f64d90118a330a3eef351.tar.gz
MFC r310257: Improve support for informational exceptions.
While CTL still has no real events to report in this way (like SMART), it is possible to trigger false event by manually setting TEST bit in Informational Exceptions Control mode page, that can be useful for initiator testing. This code supports all flavours of IE reporting: UNIT ATTENTION, RECOVERED ERROR and NO SENSE sense keys, REQUEST SENSE command and Informational Exceptions log page.
Diffstat (limited to 'sys/cam/scsi/scsi_all.h')
-rw-r--r--sys/cam/scsi/scsi_all.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index fc54a6f..7dc70e9 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -662,6 +662,14 @@ struct scsi_log_fua_stat_and_perf {
uint8_t fuanv_write_int[8];
};
+struct scsi_log_informational_exceptions {
+ struct scsi_log_param_header hdr;
+#define SLP_IE_GEN 0x0000
+ uint8_t ie_asc;
+ uint8_t ie_ascq;
+ uint8_t temperature;
+};
+
struct scsi_control_page {
u_int8_t page_code;
u_int8_t page_length;
@@ -763,21 +771,6 @@ struct scsi_caching_page {
uint8_t non_cache_seg_size[3];
};
-/*
- * XXX KDM move this off to a vendor shim.
- */
-struct copan_debugconf_subpage {
- uint8_t page_code;
-#define DBGCNF_PAGE_CODE 0x00
- uint8_t subpage;
-#define DBGCNF_SUBPAGE_CODE 0xF0
- uint8_t page_length[2];
- uint8_t page_version;
-#define DBGCNF_VERSION 0x00
- uint8_t ctl_time_io_secs[2];
-};
-
-
struct scsi_info_exceptions_page {
u_int8_t page_code;
#define SIEP_PAGE_SAVABLE 0x80 /* Page is savable */
@@ -791,6 +784,12 @@ struct scsi_info_exceptions_page {
#define SIEP_FLAGS_EBACKERR 0x02
#define SIEP_FLAGS_LOGERR 0x01
u_int8_t mrie;
+#define SIEP_MRIE_NO 0x00
+#define SIEP_MRIE_UA 0x02
+#define SIEP_MRIE_REC_COND 0x03
+#define SIEP_MRIE_REC_UNCOND 0x04
+#define SIEP_MRIE_NO_SENSE 0x05
+#define SIEP_MRIE_ON_REQ 0x06
u_int8_t interval_timer[4];
u_int8_t report_count[4];
};
OpenPOWER on IntegriCloud