Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1014014pxk; Thu, 10 Sep 2020 05:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyppe+ZaZjfDXIYzRoZ4r593ciQhPfKlC6SdYYtnGmh+NS9LPrbAFMqnlkDXPCZnp5//pul X-Received: by 2002:a17:906:fb8f:: with SMTP id lr15mr8197240ejb.25.1599739318547; Thu, 10 Sep 2020 05:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599739318; cv=none; d=google.com; s=arc-20160816; b=ftCiYkBskhHWwyvW9IxpYq8tYWouGyBLIWhbuzppm5y7EF/oGVdVWg9TM5iZjUIaQw lXMgXCdxhf4gGUw6XJEzZTcKf2Uf4v77NHsBTo7Qr6KQPoXy+COTh8eT0i2heTC3iJ5D ekRzHpkeayB/aLFOZ5fv5UdiurFz7/8D2lCRg7ztw9cAC5mv+i1eUrb1g56ud2w70cTY yQXVLJkIpnNp9LlfS2OYzoYLL7cN+ulWFFWDoP0ZcND8tc5O6G+JbYP+/t08XSrRGatK Gx5NQjTZu+qBqsofGpwRRdUpeK6L+EWs8djGedgj7VRACMYvKtT9wQhgIjgr3jSCfo7r jJ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=c6Ic9CZJiJHiMEzFcTN4c1xVURkNkOcRMwXZodyA/qY=; b=GegRPLRJfG2/ITcrPZqJKx/DDGddu8zee1UnWZkWQQORDM+3LtVKNVIctW9hDd9AQB dnTcmFNp5R+LW3eSGcm+eHWAHFlOqZ/q16Rdk1UJy2lN7GBV6YFp300G1HXYJyDVyjGK 4Dp3t+V/Qj5wdsxqKL1cWPhwx23SY0Cl4gj7Yfo3xcOKx83Okx58Z1eE2S04Vhbhq7tS vGnyzyZSKsrNNEfYs3bSAELbr5RQ5CjKrV+Z4iQZisKsq7ObZh9ALrZ58cI/fJDbnIdV JYTsTJX4hUHhRHwV0eHlbacdX7IKNKwUhzFuvcCjVWC3TpWnRBTHDLskq1qMD3KxUaML inOA== 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 f26si4182410ejj.250.2020.09.10.05.01.22; Thu, 10 Sep 2020 05:01:58 -0700 (PDT) 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 S1726079AbgIJMA6 (ORCPT + 99 others); Thu, 10 Sep 2020 08:00:58 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11772 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730383AbgIJL64 (ORCPT ); Thu, 10 Sep 2020 07:58:56 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CFC6CFB9CDA11E138A22 for ; Thu, 10 Sep 2020 19:57:53 +0800 (CST) Received: from huawei.com (10.67.165.24) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Thu, 10 Sep 2020 19:57:49 +0800 From: Longfang Liu To: CC: Subject: [PATCH 1/5] crypto: hisilicon - update mininum queue Date: Thu, 10 Sep 2020 19:56:39 +0800 Message-ID: <1599739003-23448-2-git-send-email-liulongfang@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1599739003-23448-1-git-send-email-liulongfang@huawei.com> References: <1599739003-23448-1-git-send-email-liulongfang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org At present, as HPRE/SEC/ZIP modules' parameter 'pf_q_num' is 1, kernel CRYPTO test will fail on the algorithms from the modules, since 'QP' hardware resources are not enough for CRYPTO TFM. To fix this, the minimum value of 'pf_q_num' should be 2. Signed-off-by: Longfang Liu --- drivers/crypto/hisilicon/qm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/hisilicon/qm.h b/drivers/crypto/hisilicon/qm.h index 6773f44..0420f4c 100644 --- a/drivers/crypto/hisilicon/qm.h +++ b/drivers/crypto/hisilicon/qm.h @@ -79,7 +79,7 @@ #define QM_BASE_CE QM_ECC_1BIT #define QM_Q_DEPTH 1024 - +#define QM_MIN_QNUM 2 #define HISI_ACC_SGL_SGE_NR_MAX 255 /* page number for queue file region */ @@ -309,7 +309,7 @@ static inline int q_num_set(const char *val, const struct kernel_param *kp, } ret = kstrtou32(val, 10, &n); - if (ret || !n || n > q_num) + if (ret || n < QM_MIN_QNUM || n > q_num) return -EINVAL; return param_set_int(val, kp); -- 2.8.1