From patchwork Mon May 10 14:17:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 433151 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2895853jao; Mon, 10 May 2021 07:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlh2Uo5SwjerFX5aESU6RRy+Xdc0Bt6iZxSu+HbATm+M2GUQ4njbHRyms8M5VnkD4kwK+I X-Received: by 2002:a05:6602:280d:: with SMTP id d13mr11290557ioe.90.1620656787481; Mon, 10 May 2021 07:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620656787; cv=none; d=google.com; s=arc-20160816; b=sUsYouHu4impY8MZEO8mReujlmC6ptNeefEIKVs1nDwYhW5xTzeGZ0QFM9hDPTzarj ZFEouEEEly906FZ9XZmcsX6r2Y3ba+MBVw9ZzWV8yTUbwpcphoePwjmBCKSyeIobWH3K rcUg3hhP2l/6+frd2ATXLA6IrocA1UVRPt1U1cb0wtHibb7ajDO+NcXt59oCzi5+v8rS iMINOAhGvTm7QB/QiV88fGw9HzFHYq/FLnCQXQ76UAgzABuPc2wBcfq68PjsEH1ygDOr 39K4mLVA9DKdG76Vxrz8H8O635x8N3nnL+Yl79Jp31ed8mLgQSXIGoUU0ANosnEnfppk B2ng== 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=1XDm/gOGP5lgju4tzG89B+PyEXUN/jGKmIQbMYBaucg=; b=tCJsoMH5uFrK8KtTtQejxn+4cYwqxA3NY40w9mj4aY5O2Pv/sEB4ZazKtPr+52nX6T t62eOE3Ob4RfnlLYT1iHBuPae7LxSWywf5paSlWYcHZzgyTj/KcfZ+bRw05QSH7RWjFT vurCH36TUrWt2InVHM4DhadhZ68r2LHLBJ4Krfscev8aN6ZUyq6EFcDLlzUehxFQCPXk OomIyuBjNDGsypIyqT+EyTAe/b878l+yyHMN/IVJrRIwYFpp17shUXXkzwapHdvrIOGy nAUF0/QbUlJXHpVW9VejMFrXPgBH0VlpgE6a6uyTBqq6RnpyIyKJFQjh64m3I5kODUhm 25cQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si13610863ilr.121.2021.05.10.07.26.27 for ; Mon, 10 May 2021 07:26:27 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236682AbhEJO1B (ORCPT ); Mon, 10 May 2021 10:27:01 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2674 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235418AbhEJOXq (ORCPT ); Mon, 10 May 2021 10:23:46 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Ff39B2V5Hz1BKmS; Mon, 10 May 2021 22:19:58 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Mon, 10 May 2021 22:22:29 +0800 From: John Garry To: , , , , CC: , , , , , , John Garry Subject: [PATCH v2 15/15] scsi: hisi_sas: Set max optimal DMA size for v3 hw Date: Mon, 10 May 2021 22:17:29 +0800 Message-ID: <1620656249-68890-16-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1620656249-68890-1-git-send-email-john.garry@huawei.com> References: <1620656249-68890-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 For IOMMU strict mode, gives a big performance boost in some scenarios. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.26.2 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 499c770d405c..365fc9de4be2 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -4675,6 +4675,11 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) struct sas_ha_struct *sha; int rc, phy_nr, port_nr, i; + rc = dma_set_max_opt_size(dev, PAGE_SIZE * HISI_SAS_SGE_PAGE_CNT); + /* We can live with other errors */ + if (rc == -EPROBE_DEFER) + return rc; + rc = pci_enable_device(pdev); if (rc) goto err_out;