aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/storvsc_drv.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-06-27 14:26:12 +0100
committerMark Brown <broonie@kernel.org>2018-06-27 14:26:12 +0100
commit1ce34dea91ae86bb18f493f72292df1bf6f66df7 (patch)
treea9655fcdd65c2068cc04ffe3562a9c710dfa2145 /drivers/scsi/storvsc_drv.c
parentb0e4376b34cab1cbbd7ed399a1df787890336837 (diff)
parenta26899e0baa4de07caf97f5e4d7298240e98fd0e (diff)
Merge tag 'v4.14.52' into linux-linaro-lsk-v4.14lsk-v4.14-18.06
This is the 4.14.52 stable release
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r--drivers/scsi/storvsc_drv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index c44de0b4a995..beb585ddc07d 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1725,11 +1725,14 @@ static int storvsc_probe(struct hv_device *device,
max_targets = STORVSC_MAX_TARGETS;
max_channels = STORVSC_MAX_CHANNELS;
/*
- * On Windows8 and above, we support sub-channels for storage.
+ * On Windows8 and above, we support sub-channels for storage
+ * on SCSI and FC controllers.
* The number of sub-channels offerred is based on the number of
* VCPUs in the guest.
*/
- max_sub_channels = (num_cpus / storvsc_vcpus_per_sub_channel);
+ if (!dev_is_ide)
+ max_sub_channels =
+ (num_cpus - 1) / storvsc_vcpus_per_sub_channel;
}
scsi_driver.can_queue = (max_outstanding_req_per_channel *