]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/scsi/scsi.h
[SCSI] fix check of PQ and PDT bits for WLUNs
[linux-2.6-omap-h63xx.git] / include / scsi / scsi.h
index 5c40cc537d4cc625a9ad94d76190405c52694379..192f8716aa9eba82b1ebdd6555090e54d3fcb279 100644 (file)
@@ -308,6 +308,20 @@ struct scsi_lun {
        __u8 scsi_lun[8];
 };
 
+/*
+ * 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
  */