From patchwork Thu Apr 18 13:39:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 162501 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp763385jan; Thu, 18 Apr 2019 06:42:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrIIOFiQHOfVG1LYGU7J3hlG6BOGG/FrxWUso5niLGWNRRFrr3gjNqDuaY6LIuEEPg+0mG X-Received: by 2002:a63:cc0d:: with SMTP id x13mr53945480pgf.280.1555594966009; Thu, 18 Apr 2019 06:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555594966; cv=none; d=google.com; s=arc-20160816; b=0PYix8bg7zC96zW3N+jfM0805j/QhPPz+29jt4PihOzSTbiCeUWZaHWN+a8mw2VkwH SxZOsRHMVlC+mSxysBeCXPycQvj0BgLFwKkIKckpCv9IAyAqy25HtIV7MuMUO/LSLnJ0 e9oozEoz4yXJ2VmUYjAzD5kR+VcQSD+PNFARp6lvJLkyEvLwJF2cDNJviNbz4DgpIX0j V87Ra7Thr2TvuWTJ8SE9Zt32KslnfPtsCXJZAOUSr/LlXV+ih+YXWIimXh0a3nRcaTgW w4A1WJJ8BhhcOWzbqnd1ESw/qANJDOjaF/JltdkwQwmztR8f486Azx9KJBBhJniCcwfw 7eMQ== 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 d24si2117151pls.271.2019.04.18.06.42.45; Thu, 18 Apr 2019 06:42:45 -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 S2389518AbfDRNmo (ORCPT + 30 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 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(-) -- 2.21.0 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) {