Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp955588pxb; Thu, 4 Feb 2021 01:05:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFhxbM1L7YslmwtODKenkGzONGG8ID8UAlVDIGI9CjjOCWz9SAuydPTdX8N6cCXv5Dm6MY X-Received: by 2002:a17:906:bce2:: with SMTP id op2mr7188843ejb.127.1612429532815; Thu, 04 Feb 2021 01:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612429532; cv=none; d=google.com; s=arc-20160816; b=eC2koSF+tS38cDL4ayes8T+CMkkS2UzkWVXcxOL5kLhNq5JHQz6Lf05tY4c+Tfk43b bAEwOs5EIOjiUl05LxEExuufiQcDCKwkWS/6P/juRImi9zNG3sRyeYSS8ZwltPLEmbiW fgW1JDyN0Mswp8cE/9D49Zd81WkQSB4vrNOVOyE/zjJ76U/uEWVBeaq0nU921yyHID3k 3KeWXvrWd+SacYsyUJSpHMeqCroDfD4ZFVGOVOVLdMpWzeunbptCwtUHiA/GlirQzXqV LmXmBUxkpVjTbxHYAi6+C2CTtmDkHRfqJZVC79rbK2g8p98azP5PRH4h4G6DUvHLhcWL 07KA== 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=U6hmjqHLiXiWJWo+iwNb62agtk+XEuP4jId+zBZHXks=; b=1BJjajlnrhrtbPxt0MBouzlejg/RRsRl4g6x/Td5FUYG761LOafhfTYEoN/stl6jiD Dmos+/mebs/Zbp7DikHkNxf4Ij3Rd6j6uPH1Q3Of9Kl3Ywn6Cvkyr5qzSBOmabFy6898 lUr5wCsd6txi89mhDasLbprRFeB03Gm6gR+oVqQVSboIHhsppdwMc5ltCtAJC0DVIYHd E2IpohJCx1+b4qgyxnPgyRJtmmsFheWlJyEdM4V5eQXBVa+ykToBcUNk6+Tv+cWlBjwD HNnAy87TssWMd0vWosYGUYRCVIPhCtFTGfG0ZSY8ZqwTkx34+6KBSIZs6iGeM1TJnYey naOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 a1si3085646edq.48.2021.02.04.01.05.07; Thu, 04 Feb 2021 01:05:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234620AbhBDJDX (ORCPT + 99 others); Thu, 4 Feb 2021 04:03:23 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12024 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233567AbhBDJCq (ORCPT ); Thu, 4 Feb 2021 04:02:46 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DWXZc2vYMzjJlJ; Thu, 4 Feb 2021 17:00:40 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Thu, 4 Feb 2021 17:01:50 +0800 From: Hui Tang To: , CC: , , , , Subject: [PATCH 2/4] crypto: hisilicon/hpre - tiny fix Date: Thu, 4 Feb 2021 16:59:34 +0800 Message-ID: <1612429176-28084-3-git-send-email-tanghui20@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1612429176-28084-1-git-send-email-tanghui20@huawei.com> References: <1612429176-28084-1-git-send-email-tanghui20@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Update since some special settings only for Kunpeng920. Signed-off-by: Hui Tang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c index 0045261..06448b8 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_main.c +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c @@ -318,7 +318,7 @@ static int hpre_set_cluster(struct hisi_qm *qm) } /* - * For Hi1620, we shoul disable FLR triggered by hardware (BME/PM/SRIOV). + * For Kunpeng 920, we shoul disable FLR triggered by hardware (BME/PM/SRIOV). * Or it may stay in D3 state when we bind and unbind hpre quickly, * as it does FLR triggered by hardware. */ @@ -376,11 +376,14 @@ static int hpre_set_user_domain_and_cache(struct hisi_qm *qm) if (ret) return -ETIMEDOUT; - ret = hpre_cfg_by_dsm(qm); - if (ret) - dev_err(dev, "acpi_evaluate_dsm err.\n"); + /* This setting is only needed by Kunpeng 920. */ + if (qm->ver == QM_HW_V2) { + ret = hpre_cfg_by_dsm(qm); + if (ret) + dev_err(dev, "acpi_evaluate_dsm err.\n"); - disable_flr_of_bme(qm); + disable_flr_of_bme(qm); + } return ret; } -- 2.8.1