From patchwork Thu Mar 15 23:52:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 10285959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C5CE60386 for ; Thu, 15 Mar 2018 23:53:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D18628C8A for ; Thu, 15 Mar 2018 23:53:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80F1A28C8D; Thu, 15 Mar 2018 23:53:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 434EB28C8A for ; Thu, 15 Mar 2018 23:53:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933208AbeCOXxc (ORCPT ); Thu, 15 Mar 2018 19:53:32 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:34022 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933071AbeCOXxb (ORCPT ); Thu, 15 Mar 2018 19:53:31 -0400 Received: from linuxonhyperv2.linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id wcfdeo2w73NvpwcfdeSbUZ; Thu, 15 Mar 2018 16:52:30 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv2.linuxonhyperv.com with local (Exim 4.89_1) (envelope-from ) id 1ewcfd-0005Am-Qa; Thu, 15 Mar 2018 16:52:29 -0700 From: Long Li To: "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , "James E . J . Bottomley" , "Martin K . Petersen" , devel@linuxdriverproject.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [PATCH] storvsc: Set up correct queue depth values for IDE devices Date: Thu, 15 Mar 2018 16:52:23 -0700 Message-Id: <20180315235223.19844-1-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.15.1 X-CMAE-Envelope: MS4wfBWLHNxjjAM4hXoDdiPqLIEIhz/3vW15fY8dwKq9L95jYSBTFYitIkkhn8EQhu9boYtBe0JiqbmEF14yUCHbRrE3hcdCczQrUY+XgTbF/ImGVfRDJ3w8 TdVX4LFYNyGedQfPbbnFfeM/Z0Q1iJju9XiaBCwT2huJAVUd64v9yE1kOCiTvZF3cCVcIgTxz0I2dzsP09f8xufmR9kMZoM5hU0cmUCXqCtK/xViqINFIqGU yjyLE+o1fhqXGuAWU7GOtm01WCCpjfnBdaAk3Mv2mI0zjyxjQywakqvSGLxAdzoVDPBRMN8Lb1FxtSuAOacIJHXgo4J3/3UrnpTidSPVd6jw0eINIcqHbKgx 3OPjcC1WkjNCqj4a/QDdHgdjx1kHIkecAHwpCBQ1iXNANJs5nStuqWWMJypqdXCgfyZpbp18F1h8M6p409XZwvVYOd2ya8T2AWvKQRi/9NpszmJVeOEixvaN nivkyG45Eg6/9EbtZkCsaZN8YILpw/Y5dyglWE4LdgT3h4hDoTeaMgtLrOo= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Long Li Unlike SCSI and FC, we don't use multiple channels for IDE. So set queue depth correctly for IDE. Also set the correct cmd_per_lun for all devices. Signed-off-by: Long Li Acked-by: Stephen Hemminger --- drivers/scsi/storvsc_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8c51d628b52e..fba170640e9c 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1722,15 +1722,19 @@ 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 / storvsc_vcpus_per_sub_channel; } scsi_driver.can_queue = (max_outstanding_req_per_channel * (max_sub_channels + 1)); + scsi_driver.cmd_per_lun = scsi_driver.can_queue; host = scsi_host_alloc(&scsi_driver, sizeof(struct hv_host_device));