Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp297214yba; Mon, 20 May 2019 08:54:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVvOdLtowQHMHFw1R8Sh4VcWPVAWk9mWVLpG4mhYZng+LEGtpHnh2P++Bieh/QHdaFO4MV X-Received: by 2002:a63:1e4d:: with SMTP id p13mr76537680pgm.125.1558367651726; Mon, 20 May 2019 08:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558367651; cv=none; d=google.com; s=arc-20160816; b=DEzUH953IYrjdBnZWrUggi2pAhebT/UDWINUfrblngMzdQkjBIXnJX2aJKNjzJxzzg RNJA2nqHP40o7+Ijr6GJBK5oGpSoak0vGJByOWBERR5oFqyXP/ev5Ti5n1UNKTTLXYHa CZgJcF8cGgBq2dfIfTePHwnDJ+aITPzaX2tD0QPMG8S0kylcMiEzh60feDMbT2o95eXV vQH+qQmqdSnhzVCIxPv9LxuHTKt91/jW/Z/OywSpNWWH5q0P2ZYxG4dId1rcVS4ePPSd QLh4DzDm/b4U5JDBjPRgN+molhyPogJ8Xe3tJ05e7ldbtKEvya78IBLNa/j4FIJ+nitT i00A== 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 30si18163247plc.8.2019.05.20.08.53.57; Mon, 20 May 2019 08:54:11 -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 S2388933AbfETMYw (ORCPT + 99 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 Content-Type: text/plain; charset=UTF-8 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 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) {