From patchwork Sat Nov 19 09:48:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weili Qian X-Patchwork-Id: 23243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp638292wrr; Sat, 19 Nov 2022 02:02:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Y/32xcHMpKYF2/+SBrxZ1ubHjsKWKInbZ+HbXrddNjuEDqtgudWJ8IwxNaAmPeqI4XJee X-Received: by 2002:a05:6a00:1d0c:b0:573:7b50:acb8 with SMTP id a12-20020a056a001d0c00b005737b50acb8mr10329pfx.59.1668852151814; Sat, 19 Nov 2022 02:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668852151; cv=none; d=google.com; s=arc-20160816; b=aALvbyRvsnkxIx5rH8A2HBN87PvKgqzpHTfo5058F1IUeA6Iva3Wf6khdMO35ZcIQK a09u5Xfki3S1jWF2YZdh2N+lOD2EyGUlwlRpQdPhguwbiOp9ktrruCnZCCTgQDYyUjSL TY7fA9i7N4JE+F31M46Z///P9QQEnhL2RbPersTLxmByeSpCw/bQwX+59DSWOhuXbMI3 Goz7PDRrbqPCIM6JPxZOqWqu76e7IsUc7kkDrhpLTjLqj1aj8gtDti2uYzqOmeO2uDZ2 CQAQ2YjFRE68hpBVDAsaMeFgfU+2Iv7aPp5D/ehzqMp3fevPtjPSQ3ZZSwaCY5ORIf/Y W05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=wzbhF5l+zgvlu/0p2H03RDediuh9hQHrO+gdf1gRsKI=; b=AcaJ2/7AiFaNgamnhHg429xfzckaD9JwC5RwNxBiwo+fcWe7TFQNMkOvbEg2Qj+Ye+ sxgGw2vS6eO+aSJ3lTiSnloenOW+qPaMWEshVCSLdQA1sqmSVvb9EEfD8/nC1xVZjdCc atiZUnhfFydEIA6nDdp8W+wR54D9RotEhaj6CJFs/Pc/AzLK64I/yrX93zMBIE/JLuWJ Z8yWr0SC1NQEkxL7jr3OjqkYqcmqMZZnO5FneqLHhzT2ldO5+f7OHhGCGUcEnhs92Uqc 201MjxCe/fe0wOb2Im+qrf6XXONvXIRtuJaiegQknnjlyMc5jsszdeVgU4P84P0kyAfK 3OqA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020a170903230e00b001871fb0906esi6855047plh.585.2022.11.19.02.02.14; Sat, 19 Nov 2022 02:02:31 -0800 (PST) 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 S233591AbiKSJsh (ORCPT + 99 others); Sat, 19 Nov 2022 04:48:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233069AbiKSJsd (ORCPT ); Sat, 19 Nov 2022 04:48:33 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 319A61004E; Sat, 19 Nov 2022 01:48:31 -0800 (PST) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NDpdy2ykgzqSWc; Sat, 19 Nov 2022 17:44:38 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 19 Nov 2022 17:48:29 +0800 Received: from localhost.localdomain (10.69.192.56) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 19 Nov 2022 17:48:28 +0800 From: Weili Qian To: CC: , , , , Weili Qian Subject: [PATCH] crypto: hisilicon/qm - fix 'QM_XEQ_DEPTH_CAP' mask value Date: Sat, 19 Nov 2022 17:48:43 +0800 Message-ID: <20221119094843.10707-1-qianweili@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749918313483370634?= X-GMAIL-MSGID: =?utf-8?q?1749918313483370634?= 'QM_XEQ_DEPTH_CAP' mask value is GENMASK(31, 0) instead of GENMASK(15, 0). If the mask value is incorrect, will cause abnormal events cannot be handled. So fix it. Fixes: 129a9f340172 ("crypto: hisilicon/qm - get qp num and depth from hardware registers") Signed-off-by: Weili Qian --- drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 36d70b9f6117..9072bee7336f 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -336,7 +336,7 @@ static const struct hisi_qm_cap_info qm_cap_info_vf[] = { static const struct hisi_qm_cap_info qm_basic_info[] = { {QM_TOTAL_QP_NUM_CAP, 0x100158, 0, GENMASK(10, 0), 0x1000, 0x400, 0x400}, {QM_FUNC_MAX_QP_CAP, 0x100158, 11, GENMASK(10, 0), 0x1000, 0x400, 0x400}, - {QM_XEQ_DEPTH_CAP, 0x3104, 0, GENMASK(15, 0), 0x800, 0x4000800, 0x4000800}, + {QM_XEQ_DEPTH_CAP, 0x3104, 0, GENMASK(31, 0), 0x800, 0x4000800, 0x4000800}, {QM_QP_DEPTH_CAP, 0x3108, 0, GENMASK(31, 0), 0x4000400, 0x4000400, 0x4000400}, {QM_EQ_IRQ_TYPE_CAP, 0x310c, 0, GENMASK(31, 0), 0x10000, 0x10000, 0x10000}, {QM_AEQ_IRQ_TYPE_CAP, 0x3110, 0, GENMASK(31, 0), 0x0, 0x10001, 0x10001},