From patchwork Tue Jan 26 11:04:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 370619 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp4909579jam; Tue, 26 Jan 2021 04:14:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO8FyAIPrczlFO5eFbim36E2NdVrDGH/V1NVddGa0Wb57/AHpLakNM92zBFEO67NMdIrY2 X-Received: by 2002:a17:906:7a42:: with SMTP id i2mr3414282ejo.27.1611663243172; Tue, 26 Jan 2021 04:14:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611663243; cv=none; d=google.com; s=arc-20160816; b=il7KksA4lhiht5UlyIlGXD3r4GU8WYytbArGnMY61SHzbpSDMgf6A8FqkUN9XVqYZn AbgDSEGaa45b0RiiZDvouIJBbp+gH2CBqxcJu7Hyd6GtPY2YtFuPxzpTAFwKuVJrbyHz YJLmZKIOYAOafDMFK0dczRUvwDLwhPJnO/kK4MNU9LKFR7eDhtrPQUWiFldshdftlUAt BGzIRM6wLjWhTBMmoAzG53CqM1oaqVpkBeRO5VXF+hs7MaADc9QtzMCTMvkTlzq3qrP2 8cl1aq0bxnfRIU/y6cRaYW5uDFI8SxbxOOKQDKSXqr1IefYIogvh7z5TNGj+ra3n9Wov Iaxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=1mmEw98Ob5714/PyQnx0POH0Iprr+HZtG+gKtZ1ZqNQ=; b=sFSJiUIVKcQESJ0au5SWzxHQqNejdDS9jM9clTcUlM8Dr8RQoU3GjaWsOHHnNDRrO+ t1uRQIZep9D1ufRB3GpcHhAJHuTvFJvBKd7nx2/xDZ3hgKIzJrHUTkQCM3mfGyvBBSvn ttmIbadQr+2nACsBbZw1DH9NUFE8G2ecLayVHUwCktAeZHn4kKfSikkZJ31MpAdJOYZ/ DJIiqLqADca7nHEEofgHq1lya+ma7CWvDR8/IG/ms/idyk2Tc7waOm3gPeADSLK9e0O5 vPjIptW9sjYSCcrBx2gv5WTcr5sWYRIwg57tgRSrleNkRgrAOq5ME3N3oSX/k4dSP7c9 cL4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a73si8889453edf.23.2021.01.26.04.14.03 for ; Tue, 26 Jan 2021 04:14:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405132AbhAZMNT (ORCPT ); Tue, 26 Jan 2021 07:13:19 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:11882 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404910AbhAZLJS (ORCPT ); Tue, 26 Jan 2021 06:09:18 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DQ3pw35q2z7bKw; Tue, 26 Jan 2021 19:07:20 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Tue, 26 Jan 2021 19:08:25 +0800 From: John Garry To: , CC: , , , John Garry Subject: [PATCH 2/5] scsi: hisi_sas: Don't check .nr_hw_queues in hisi_sas_task_prep() Date: Tue, 26 Jan 2021 19:04:25 +0800 Message-ID: <1611659068-131975-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1611659068-131975-1-git-send-email-john.garry@huawei.com> References: <1611659068-131975-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Now that v2 and v3 hw expose their HW queues (and so shost.nr_hw_queues is set), remove the conditional checks in hisi_sas_task_prep(). This change would affect v1 HW performance (as it does not expose HW queues), but nobody uses it and support may be dropped soon. Reviewed-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.26.2 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 625327e99b06..d469ffda9008 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -445,21 +445,19 @@ static int hisi_sas_task_prep(struct sas_task *task, } } - if (scmd && hisi_hba->shost->nr_hw_queues) { + if (scmd) { unsigned int dq_index; u32 blk_tag; blk_tag = blk_mq_unique_tag(scmd->request); dq_index = blk_mq_unique_tag_to_hwq(blk_tag); *dq_pointer = dq = &hisi_hba->dq[dq_index]; - } else if (hisi_hba->shost->nr_hw_queues) { + } else { struct Scsi_Host *shost = hisi_hba->shost; struct blk_mq_queue_map *qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT]; int queue = qmap->mq_map[raw_smp_processor_id()]; *dq_pointer = dq = &hisi_hba->dq[queue]; - } else { - *dq_pointer = dq = sas_dev->dq; } port = to_hisi_sas_port(sas_port);