Merge tag 'sound-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / scsi.c
index d81f3cc43ff1d3e834fcb6d2dc6460810d167ee8..79c77b485a67298ed5fb912fe86c33813732157b 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);
 
@@ -1371,7 +1367,11 @@ MODULE_LICENSE("GPL");
 module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels");
 
+#ifdef CONFIG_SCSI_MQ_DEFAULT
+bool scsi_use_blk_mq = true;
+#else
 bool scsi_use_blk_mq = false;
+#endif
 module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO);
 
 static int __init init_scsi(void)