Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3040043rwb; Mon, 5 Sep 2022 05:40:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR56jiFFSd04XZaWAP4f8J9qkLwN6UXBdDj/EelSvGw7Z96CjCKyagydNFUCzd/Gdvl1rjEX X-Received: by 2002:a17:90b:1d86:b0:1f7:31c6:1cce with SMTP id pf6-20020a17090b1d8600b001f731c61ccemr19729266pjb.192.1662381653332; Mon, 05 Sep 2022 05:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662381653; cv=none; d=google.com; s=arc-20160816; b=y+LNXBgpX/rKmUTa6xrtmv4DPRFY/CL5eiIx4St8i5WQxsFNF0EASzUATFxr0r2PmJ QuK3HKCeP9CV2IO51NIfEJQc9pWTckTxLXPsFEXJ09WqUCAwM4AgHTuhvSNqw7M0cizV QFKtpk5l8zAiiOGt/gJhuJfcWM4mmHcaLIsricZYBipv3rAAW8LfWzurIAyNAkpQpeHq bnBmq+M8Y61P9B/8rM+i3ekLsOryJe7sw3+9kak/7kjwdJxVf6WXEN+1P6lZ4yD26tvv GnYcxxAh+NYCJ6jdd7MLxhfM1EOB0rSZPE+4B4J30uHigTI+cpCzsWbvb93+gNuHYg2O ZhOg== 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=cXrgdAeK4UPGLSHfSUSA6ITdLk2ppnBkHtXoYErDoPc=; b=x76fhUoI58G6x7ObCbpRzZ1/LYV8xYHwj7DIU+ka0eeU6K0NrOpNu53JfoVar156Hm Tf4dVbsiaZAgK17AJLy4PuR+RjoeK/HKUQSFs2apLf4Y+vsAWfkDXIM0wEGy2J9kq45I orRzGkUG4CfetLMteaTlbxBLsxItUEYRgqvkt7raTVQ2SX8QxITKlKhwTOcnWxauf81q 0Zph1tjvQu9suOE6GNZWRyvrOw4dc/YFe6nMfi4Pl0stqKey5lrD6KOU1TAJNJ0nPvTM Kq5Q3Wn0bjkPWEDLWjAh7svIEvqQATpITBA002qMnHMpqwZobB2+svrM1XyBQvtqxMKz br/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020aa78893000000b0052b29ffa4c9si5928614pfe.347.2022.09.05.05.40.36; Mon, 05 Sep 2022 05:40:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236562AbiIELzg (ORCPT + 99 others); Mon, 5 Sep 2022 07:55:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237630AbiIELz0 (ORCPT ); Mon, 5 Sep 2022 07:55:26 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D83BE2AC6A; Mon, 5 Sep 2022 04:55:25 -0700 (PDT) Received: from fraeml714-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4MLn0s30Ffz681Yv; Mon, 5 Sep 2022 19:51:25 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml714-chm.china.huawei.com (10.206.15.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 5 Sep 2022 13:55:23 +0200 Received: from localhost.localdomain (10.69.192.58) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 5 Sep 2022 12:55:21 +0100 From: John Garry To: , CC: , , , John Garry Subject: [PATCH 1/5] scsi: hisi_sas: Revert change to limit max hw sectors for v3 HW Date: Mon, 5 Sep 2022 19:48:45 +0800 Message-ID: <1662378529-101489-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1662378529-101489-1-git-send-email-john.garry@huawei.com> References: <1662378529-101489-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that libsas and the SCSI core code limits the default sectors from commit 4cbfca5f7750 ("scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit") and commit 608128d391fa ("scsi: sd: allow max_sectors be capped at DMA optimal size limit "), there is no need for the hack to limit the max HW sectors. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index efe8c5be5870..1710f479a896 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2786,7 +2786,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev) struct hisi_hba *hisi_hba = shost_priv(shost); int ret = hisi_sas_slave_configure(sdev); struct device *dev = hisi_hba->dev; - unsigned int max_sectors; if (ret) return ret; @@ -2802,12 +2801,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev) } } - /* Set according to IOMMU IOVA caching limit */ - max_sectors = min_t(size_t, queue_max_hw_sectors(sdev->request_queue), - (PAGE_SIZE * 32) >> SECTOR_SHIFT); - - blk_queue_max_hw_sectors(sdev->request_queue, max_sectors); - return 0; } -- 2.35.3