aboutsummaryrefslogtreecommitdiff
path: root/include/scsi/scsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r--include/scsi/scsi.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 00137a7769e..192f8716aa9 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -106,6 +106,7 @@
#define VARIABLE_LENGTH_CMD 0x7f
#define REPORT_LUNS 0xa0
#define MAINTENANCE_IN 0xa3
+#define MAINTENANCE_OUT 0xa4
#define MOVE_MEDIUM 0xa5
#define EXCHANGE_MEDIUM 0xa6
#define READ_12 0xa8
@@ -125,6 +126,8 @@
#define SAI_READ_CAPACITY_16 0x10
/* values for maintenance in */
#define MI_REPORT_TARGET_PGS 0x0a
+/* values for maintenance out */
+#define MO_SET_TARGET_PGS 0x0a
/* Values for T10/04-262r7 */
#define ATA_16 0x85 /* 16-byte pass-thru */
@@ -306,6 +309,20 @@ struct scsi_lun {
};
/*
+ * The Well Known LUNS (SAM-3) in our int representation of a LUN
+ */
+#define SCSI_W_LUN_BASE 0xc100
+#define SCSI_W_LUN_REPORT_LUNS (SCSI_W_LUN_BASE + 1)
+#define SCSI_W_LUN_ACCESS_CONTROL (SCSI_W_LUN_BASE + 2)
+#define SCSI_W_LUN_TARGET_LOG_PAGE (SCSI_W_LUN_BASE + 3)
+
+static inline int scsi_is_wlun(unsigned int lun)
+{
+ return (lun & 0xff00) == SCSI_W_LUN_BASE;
+}
+
+
+/*
* MESSAGE CODES
*/