Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp639048pxb; Fri, 13 Aug 2021 03:05:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYJ/uTq8ekNozJ1yh4TAKtT3F1G6USF7C/uUkpRzfw/GqHX/AamU5hd9SQgaPAdKFjp8C+ X-Received: by 2002:a02:9a02:: with SMTP id b2mr1547647jal.89.1628849138158; Fri, 13 Aug 2021 03:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628849138; cv=none; d=google.com; s=arc-20160816; b=N6j8J2v+wlT9tU2WRhVJ6F5C3rdSYPJ3L015gopUX5xB0o2m5xMZlD9E8/uNDvMnQH whCKwy1rMS29Hb7iHg8f9ksyE2B0zSmyiemwu8ZEO3m+F48rCGy+qpeUzWXZJm1uZN7t ieG5owFCt4HwrSUFnkYCDaIwt19KGHyjJUJytlYHkYNOWuGkq1tnheAHmVtz+1rZPn89 hbHVJPhZm0U1DZyrD0qcZ7XOy/RnZ/emQuAyE6U5u37j6G4Y0AkBcRuG44W94M+rddzD aSWyV7R9lr27gC91I8xyKErrrHOLrCIZ3l8RCMCY3boeeUifEck0R4xmR0sfY5HUq8mv S1Zw== 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=Ua0ieP4hkR3vIUdyWxozCYKGfd7nLOVor99XBNBQXLo=; b=vt2kYqS34FYWh+RW9wQw8eqT3jGO50pFz0cxILWP+hy9LBtWOX1zvkaMfwJOT47nUt MWs1k61dlsw9wH01eQVRV9mO8MYL690wYFCG/tYTcF0zCWOHIPKQB8CcxXMjroAOM3Mt 7X84d2deOBo7I4kni9+41VumgdvVWYF8c8e3GSGmsRxNUvcKo45LmfjWjpzBN+n2scDM yb0PSMkxDL3r04CfzRuCuPcLLwbxjXV3iGVV2hBt7en9sl0Pl6pHyy6Ztoka+x3n3x66 IJr8H75+YECCevseRLMQrpsJ2EVjng0qcJ6k/llSXvUQvP+VjSW4lTY2HTOlcc1twcBS 6uQg== 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; 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 f7si1073069jav.38.2021.08.13.03.05.26; Fri, 13 Aug 2021 03:05:38 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239933AbhHMJyW (ORCPT + 99 others); Fri, 13 Aug 2021 05:54:22 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:13313 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239886AbhHMJyV (ORCPT ); Fri, 13 Aug 2021 05:54:21 -0400 Received: from dggeme768-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GmJmH394tz83p1; Fri, 13 Aug 2021 17:53:51 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by dggeme768-chm.china.huawei.com (10.3.19.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 13 Aug 2021 17:53:53 +0800 From: Weili Qian To: , CC: , , , Subject: [PATCH v2 5/5] crypto: hisilicon - check _PS0 and _PR0 method Date: Fri, 13 Aug 2021 17:50:09 +0800 Message-ID: <1628848209-26398-6-git-send-email-qianweili@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1628848209-26398-1-git-send-email-qianweili@huawei.com> References: <1628848209-26398-1-git-send-email-qianweili@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme768-chm.china.huawei.com (10.3.19.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org To support runtime PM, use the function 'pci_set_power_state' to change the power state. Therefore, method _PS0 or _PR0 needs to be filled by platform. So check whether the method is supported, if not, print a prompt information. Signed-off-by: Weili Qian --- drivers/crypto/hisilicon/qm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index e29ff97..369562d 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -3282,6 +3282,10 @@ static void hisi_qm_pre_init(struct hisi_qm *qm) init_rwsem(&qm->qps_lock); qm->qp_in_used = 0; qm->misc_ctl = false; + if (qm->fun_type == QM_HW_PF && qm->ver > QM_HW_V2) { + if (!acpi_device_power_manageable(ACPI_COMPANION(&pdev->dev))) + dev_info(&pdev->dev, "_PS0 and _PR0 are not defined"); + } } static void qm_cmd_uninit(struct hisi_qm *qm) -- 2.8.1