Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp606212yba; Thu, 18 Apr 2019 06:44:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2bJLNgpbeRBtqLm0En0plM2f/kGjueaw9p6Y5eTavWawbnmYbUPxn68H+QHnpoxrDv0ex X-Received: by 2002:a17:902:2f84:: with SMTP id t4mr73626755plb.6.1555595070558; Thu, 18 Apr 2019 06:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555595070; cv=none; d=google.com; s=arc-20160816; b=NzLuDA2POW567xxxamzJBTbvbnkoXqdm8iPVLXyUQS7Pj+Hs2wYGn3JnzytkVAtLin 7j1/0GUaf65c35AtxdS4DazbzDGG9Tzc/q+WLoVa6OMsNnPOpXnoabD20bwxCzmExc9D TBHCw0vLnwiYw4Ju2a5x2Dzlc/ubjzT1lYxBl45ippr0q5cjnQfuDPSLtpBt8NqhwIug noUON8dEQIx6tRkgxYZNJXuTN90OszbyHOXxtgq9JEDTGVb4sai5Sw01ymLqdIeBrp0B btggMgm6+Zp9819Qs5pMjlhv+Jo+TSYyXN8ZvBj/7BMsEodYGMoBBJCKN11NWXvfjjLs PSrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rLovY7zknClAsbsbzk0PAiOMuWoEaHFQshIOZpjsy8c=; b=s6eynYnhEsGR6VoypxtVy0efMZv9lmC8VL28z9jHLPBTZtLCOwkdxPRBNw3Lvh6vTT RhGdWpX/p0+aOY/fh7IetFnppPl9clFIGc5euwD1yj0BTx1RN+WpPp38SBwRKlMyiVkJ hg+/pRvxkWwozZJ6PaU+jmOd92nJR3EYHHhMRhEfdsK7tvbmd/sNj+iLFQzqJ9x1lqnj KPzYtc3/DuC3vSTy66n7YG66sAw+AeRUU7Qjz880Lfuwfa67UM/eVfm/SzsFD2trXNdl ZbYcJqpl++gqYJj9v7uEde61RPQ4idN3VxAvbxkKq+hII7hxcnUvPE/AR335bMHt22qS ED7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si2282655pff.216.2019.04.18.06.44.15; Thu, 18 Apr 2019 06:44:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389353AbfDRNmo (ORCPT + 99 others); Thu, 18 Apr 2019 09:42:44 -0400 Received: from foss.arm.com ([217.140.101.70]:33814 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389054AbfDRNml (ORCPT ); Thu, 18 Apr 2019 09:42:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1497980D; Thu, 18 Apr 2019 06:42:41 -0700 (PDT) Received: from e110176-lin.kfn.arm.com (e110176-lin.kfn.arm.com [10.50.4.178]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6BAEE3F5AF; Thu, 18 Apr 2019 06:42:39 -0700 (PDT) From: Gilad Ben-Yossef To: Herbert Xu , "David S. Miller" Cc: Ofir Drang , stable@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 35/35] crypto: ccree: handle tee fips error during power management resume Date: Thu, 18 Apr 2019 16:39:10 +0300 Message-Id: <20190418133913.9122-36-gilad@benyossef.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418133913.9122-1-gilad@benyossef.com> References: <20190418133913.9122-1-gilad@benyossef.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ofir Drang in order to support cryptocell tee fips error that may occurs while cryptocell ree is suspended, an cc_tee_handle_fips_error call added to the cc_pm_resume function. Signed-off-by: Ofir Drang Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ --- drivers/crypto/ccree/cc_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index 77025da2dcb6..2dad9c9543c6 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -11,6 +11,7 @@ #include "cc_ivgen.h" #include "cc_hash.h" #include "cc_pm.h" +#include "cc_fips.h" #define POWER_DOWN_ENABLE 0x01 #define POWER_DOWN_DISABLE 0x00 @@ -50,12 +51,13 @@ int cc_pm_resume(struct device *dev) } cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); - rc = init_cc_regs(drvdata, false); if (rc) { dev_err(dev, "init_cc_regs (%x)\n", rc); return rc; } + /* check if tee fips error occurred during power down */ + cc_tee_handle_fips_error(drvdata); rc = cc_resume_req_queue(drvdata); if (rc) { -- 2.21.0