Received: by 10.213.65.68 with SMTP id h4csp61047imn; Thu, 15 Mar 2018 16:54:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELsyGf0CY+xrKWLCQj48EFEnEaP67FDwkHcdBL/muveRJuudEWzoAM1Iy4qbTUJx6tiIJo46 X-Received: by 2002:a17:902:4001:: with SMTP id b1-v6mr9815632pld.28.1521158098380; Thu, 15 Mar 2018 16:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521158098; cv=none; d=google.com; s=arc-20160816; b=OWAWU8ecw5AKEjmYkMAFdiB8Oe6Uu/ZWnZIBC17MZ7QWFo4UKEs2nJk/u6LL/x3ulV vBeQT97fr8uI2x4hSuH9kpd+IrkRMipyupFLWHSnMXJje8NxlDStb/VCIbPgXUdU/EgK Duya8rFSfsw+6cmK3CiS46ry4yz6L6T5fr4sZIb+Jl7FUyz+WfSjqa868Y8vn2HE4ACJ eXaw1bp7QDcn0Y+W+uelA+TOBsVXDSUt36WCa2bKM01XuAdKlh5PF8cWAzUM9s01aKtq xlhvgJml4NnhE1qL4VwcEL72urDghn+x5Svt9AD7YQQfQfvcj7AEeczDhsFDSNgBbxV0 q5Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HyXNbdMAoBqT0Xj46BWvE93ylqjDEGmMlGv6oACBOOo=; b=cwc35gpG1Xo9Nv04sRYDw0AXWqqM/6zEnhZLGFdd559OLcfspOGZsM4tL7Abj+pZAs 3PxZUwHhpIKyrH8rMnYzVI79Ak+VuZR287laefl+N7N+nVSXkUUPy4r5zwFFQGfhwmzg Qq8/DJ4Hf++WKzQ62exGFYRV6jhrOxg7RrnV5LllX9A9j5egCJoDFD4EF+MjVnFar6be WHW2Zb9CtZh5UD4Rp915qj1avDnSGeQ0nudGHp+o/dCfsbb5oZgKegEeHknKIFWGMPco OnlDMD7MjUDMaAszu+cnDjuN9CRfTHD0+YJ2A2tjiFS9qfubXbDVTLd1N3Xv2ByyV53L etKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si4059530pgq.320.2018.03.15.16.54.43; Thu, 15 Mar 2018 16:54:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933247AbeCOXxc (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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)); -- 2.14.1