From patchwork Mon May 20 12:13:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 164611 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp220545ili; Mon, 20 May 2019 05:24:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/i/s4/P1fc0BResuCx93DaTwJZnSSHcV/1uPGVPt5l/CjG6L8E5G98FGD+JeC9L7ztuGP X-Received: by 2002:a62:d244:: with SMTP id c65mr41904856pfg.173.1558355094936; Mon, 20 May 2019 05:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558355094; cv=none; d=google.com; s=arc-20160816; b=SQU9kLc6JpiixKN7aRYGJsTSKqUQkLCSSv4GNenMHODh996WYmYX6gQYKVvgeEg43w h8wgJZTTtRJCHtbphIOrzFXnHcFDPZDQPxiepLnAB7ojcv3uMLufVG9A65yH9jJP5eKA 2GN7s1wRhdhLvQHWpudUvos0E1/JX1GaWoZsTZoA4Z2aU1ak8wq1vYJHyKWMdz5dq1w+ DpOiEpxbb5xy1X0PmHtK6iaVN3cX96ZtqsJCeWY8I3JH6bVhJtaFA/Jmi36QbtNrhQeM VwaktZdV0yreGvDwTh1mcCM7OE7gwQgm1ozI35ERnDDJ3Dv2QKLWB9jUR4NPWiqiSpTI m/EA== 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=d7WQS5qei7jJLROSDuqiz9zFkjonfrCLNC4gJKOFBt0fYVAwVZAZU9PY3yRWrHf3V5 K8xXNYb2/By9TPV3dGXzs+m54mDZg2nxRzgBg/FY6RNAV5As/zOMKy0uK8f6M6BpSii5 JTY4EUwYxZXlu8rYymA0J8SMBajg4JILoD/X5G7wcJVZ/no7fA4lCUPnqui7ju+ZEgYV c/Tjw7XmKcqdcscw4uJKxYX1bWfUWytPq2B4DpKPzhrEFidUMEfpbmyJj1Q5QDMvL+cM BCSFsD9kCiPuLk+dRN/n1yjVLGI0zSWss0gte28dbIgAKmtQdHFsHkqOdY2LwZ95a3rb RZRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uqratxeL; 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 j185si7827853pge.465.2019.05.20.05.24.54; Mon, 20 May 2019 05:24:54 -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=uqratxeL; 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 S2388937AbfETMYw (ORCPT + 30 others); Mon, 20 May 2019 08:24:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:39780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388923AbfETMYu (ORCPT ); Mon, 20 May 2019 08:24:50 -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 8013D21479; Mon, 20 May 2019 12:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355090; bh=evbFVzhLxEg4SbCoKYUaCDJhdyPgsuUfMr8WxKWYoSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uqratxeL/FEKfOGSyHQUmgwR74/LuMarNB0TwFfK5VbzhXxucbS+xR6C1vD54CGYv Vj5aCPKmfusRZPnKUmAIAUHZelcK2hcvFHv9c3r71n5oO59g2/KfASPpITBsfSVrqo 3Xzm68uiPsbix5gYo5UFQITSNGsW6gMtQRvn0Nzw= 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 4.19 052/105] crypto: ccree - handle tee fips error during power management resume Date: Mon, 20 May 2019 14:13:58 +0200 Message-Id: <20190520115250.648743917@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115247.060821231@linuxfoundation.org> References: <20190520115247.060821231@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) {