mpt2sas: Copyright in driver sources is updated for year the 2014
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / scsi.c
index d81f3cc43ff1d3e834fcb6d2dc6460810d167ee8..1423cb17fbfda37e4c944b2e7e60feae14359b04 100644 (file)
@@ -670,14 +670,10 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
                return SCSI_MLQUEUE_DEVICE_BUSY;
        }
 
-       /*
-        * If SCSI-2 or lower, store the LUN value in cmnd.
-        */
-       if (cmd->device->scsi_level <= SCSI_2 &&
-           cmd->device->scsi_level != SCSI_UNKNOWN) {
+       /* Store the LUN value in cmnd, if needed. */
+       if (cmd->device->lun_in_cdb)
                cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
                               (cmd->device->lun << 5 & 0xe0);
-       }
 
        scsi_log_send(cmd);