[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>
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user