Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3769664imm; Mon, 18 Jun 2018 03:52:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJRf8lVV46tNgPwq42T5hWOTzXffvYeAXY8lKpxF9MdjLaeX65FFRPZVfjRTnSmMl2QIwWO X-Received: by 2002:a65:6310:: with SMTP id g16-v6mr10653015pgv.271.1529319166020; Mon, 18 Jun 2018 03:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529319165; cv=none; d=google.com; s=arc-20160816; b=L/jYn6fzAuqDaaE6QdZhxIMvmUBDArpN7oJ0avtwdM+1S9IqrQiuowcgjIOitvk5CR mzmXydls491gcZDtEGbUg67zEP5mKm0GZXABUVtFP7Ra+fXhSj52eEOyYpswvgJxiPKr Tw5lEy60ofNQG+hYU1mecPoF8wkYz9pCniqIuljxgvG1itFdaK4pQ4ZydOJ8v3tBkSQB zX+jng1BXGxqZtiGX/YhTcyggr6pFP+fpyu43Si8dXvcL7rWr3O2WlNLlrMlvU3jIPzT E1vbarz23hz0YQ6YdLSyLW7CK8RIkRsvXlEwPsE+4wwnv+okPFhmUBbT9HAftrJlufvZ dkbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eD9m5fJpZmKamdY9QS28TQCdv/LeIU3MbW619enuQE0=; b=WbqxmcfWDJNDedz4YmvOF+sLeIsrg8cFJtD1BmbuDYKKwH0pyrdQCD2DzvkFVBFmdj HuP+egLbrW01GJxwk1xw+jOqoC8IfdcsWcAq7ePK0cFRuRDZXkdXTQuG6mO3wRqL7XWm O9e+tmyBue+VDH6nNPFfXZ7XQklVQjq2bGFzOmpI0joJV8qKY9zs8kMfOUGdl29ForM6 uwSrTIk5MEPPMd04ALfclRk9bbJ/39H+KeOqQh3WSMTl43d5XwSuMrhkqVZb8sT1b3QQ W2Z6d833yRisEByi3jHLLu2W/gPotolx//NBBjtgf5vxbxnpgxt8YJR5zBp9YcYP9EUA 6Csg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h26-v6si14590324pfj.120.2018.06.18.03.52.32; Mon, 18 Jun 2018 03:52:45 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935230AbeFRKFL (ORCPT + 99 others); Mon, 18 Jun 2018 06:05:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54296 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934927AbeFRIRt (ORCPT ); Mon, 18 Jun 2018 04:17:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F3762C75; Mon, 18 Jun 2018 08:17:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Long Li , Michael Kelley , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.16 065/279] scsi: storvsc: Set up correct queue depth values for IDE devices Date: Mon, 18 Jun 2018 10:10:50 +0200 Message-Id: <20180618080611.520345544@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Long Li [ Upstream commit f286299c1d0ba5e2ca0377610307b370fe178767 ] Unlike SCSI and FC, we don't use multiple channels for IDE. Also fix the calculation for sub-channels. Signed-off-by: Long Li Reviewed-by: Michael Kelley Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/storvsc_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1722,11 +1722,14 @@ static int storvsc_probe(struct hv_devic 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 *