summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorJames Bottomley2008-08-21 22:14:14 +0200
committerJames Bottomley2008-08-29 16:19:11 +0200
commit01b291bd66564b4bd826326af6bd0b6d17e99439 (patch)
tree89ba1f339a68827c1ea0e434629759a9252b0a69 /include/scsi
parent[SCSI] make scsi_check_sense HARDWARE_ERROR return ADD_TO_MLQUEUE on retry (diff)
downloadkernel-qcow2-linux-01b291bd66564b4bd826326af6bd0b6d17e99439.tar.gz
kernel-qcow2-linux-01b291bd66564b4bd826326af6bd0b6d17e99439.tar.xz
kernel-qcow2-linux-01b291bd66564b4bd826326af6bd0b6d17e99439.zip
[SCSI] fix check of PQ and PDT bits for WLUNs
For IBM z series certain LUNs can no longer be accessed. This is because kernel version 2.6.19 a check was introduced not to create a generic SCSI device for devices that return PQ=1 and PDT=0x1f. For WLUNs (see SAM-3, p. 41ff) generic SCSI devices should be created unconditionally without looking at the PQ bit, so add a check for WLUNs in with this test. Acked-by: Martin Petermann <martin@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 5c40cc537d4c..192f8716aa9e 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -309,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
*/