From patchwork Mon May 20 12:14:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 164625 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp231836ili; Mon, 20 May 2019 05:35:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0lyRyfw77PiFSbV+Pn2lF4NeYBo7kqpyOZafrENJG3SgIkhlQ7yRNsq7HUMepQrOFeH3w X-Received: by 2002:a17:902:d706:: with SMTP id w6mr28209438ply.261.1558355712282; Mon, 20 May 2019 05:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558355712; cv=none; d=google.com; s=arc-20160816; b=VIjcPM6IjQIxdgo9NcWZCRAH5/qUv+/VJ3SzjJgG8Tqv6+dGVl8zwepsjcd9G6oUDU 1rygGqXWRsz3CSHwPkCm6tPZrn2BHU9yuclQjX1R5t6e+bzwkun8354LFYCFV07thQTd 0GfM3F3jmfIhK3SRtFY/tdpftZgclUbokiGPyXNHBH5NVMXAbEhz9ZfsiNgTSCYj5UAb e3q0zG1BisMLOm0SJhhEuNpr3DHYCtiBriatV5cYCaa8eboVF2TFL8p0W7c1nDnhGhdb iEdhvglAZUqtyGKKkI/jCh8Bib0x7YCFG8tggyI+CRSdHNQhreEnP7xlMiemYkJ9Is7K Zy0A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bsr5lnxGn3aaW5Bh5tHhpU2uotZZ/yJORIJIhWro+k8=; b=IhbMvEA++Pnwu2OUbP5/t+gmI2Jf7TdYYSAjkxkVrycwi8ZjCZxjZKWdXNLzun1J6v GsonOjeaUOlFxn1+Vpx0lcMvoxy2070HRH12vyDAE/Eb5Lu7DQdiG7BrRiEIUaZoKZe7 ht0mEVtSyJyaoFztdIr1T+RS+GwtjU9gQi66l/oTsS8TfUSVUzrL7j3LOoKBX8RmZxbu OB90IxVPg5RzYk+ZiHoWpfbPlbA+/K9ofHN594RFAeQLi/4jy6KcFofbcO7ZT6ud7+od KrmXaRD09wUviWATY2/kBvSy1Q6pmiUYxkoB5iAwHPBsxMvArpKMWm/R1gwKXoTkbEo9 N4JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fi/ZjgZp"; 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 e11si12396932pgv.569.2019.05.20.05.35.08; Mon, 20 May 2019 05:35:12 -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; dkim=pass header.i=@kernel.org header.s=default header.b="fi/ZjgZp"; 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 S2390843AbfETMeE (ORCPT + 30 others); Mon, 20 May 2019 08:34:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:51178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733307AbfETMeA (ORCPT ); Mon, 20 May 2019 08:34:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4AE07204FD; Mon, 20 May 2019 12:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355639; bh=evbFVzhLxEg4SbCoKYUaCDJhdyPgsuUfMr8WxKWYoSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fi/ZjgZpIa5N2zbyDfBAc5c93bbWdlggeESZy5O5RPtlPEGuNWbWHkUaxSes2wfZM ApaqpiIL6kWMukNSIlKa2JKixJO2SAodo8qC7TCw7ZEMglpR4U0yb3VD+RJBCwijxs wu4OGQ0gZ0xsY0EOZ+t1N6Yk1K88XTqgRQGT0M5o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ofir Drang , Gilad Ben-Yossef , Herbert Xu Subject: [PATCH 5.1 068/128] crypto: ccree - handle tee fips error during power management resume Date: Mon, 20 May 2019 14:14:15 +0200 Message-Id: <20190520115254.401097564@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115249.449077487@linuxfoundation.org> References: <20190520115249.449077487@linuxfoundation.org> User-Agent: quilt/0.66 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 commit 7138377ce10455b7183c6dde4b2c51b33f464c45 upstream. 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+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccree/cc_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- 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) {