[SCSI] add SCSI_UNKNOWN and LUN transfer limit restrictions
Original From: Ingo Flaschberger <if@xip.at> To support the RA4100 array from Compaq. This patch now correctly handles SCSI_UNKNOWN types with regard to BLIST_REPORTLUNS2 (allow it) and cdb[1] LUN inclusion (don't). It also allows a BLIST_MAX_512 flag to restrict the maximum transfer length to 512 blocks (apparently this is an RA4100 problem). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
d637c4543f
commit
4d7db04a7a
@@ -565,7 +565,8 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
|
||||
/*
|
||||
* If SCSI-2 or lower, store the LUN value in cmnd.
|
||||
*/
|
||||
if (cmd->device->scsi_level <= SCSI_2) {
|
||||
if (cmd->device->scsi_level <= SCSI_2 &&
|
||||
cmd->device->scsi_level != SCSI_UNKNOWN) {
|
||||
cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
|
||||
(cmd->device->lun << 5 & 0xe0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user