From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755008AbbBBTUL (ORCPT ); Mon, 2 Feb 2015 14:20:11 -0500 Received: from mga11.intel.com ([192.55.52.93]:17406 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754850AbbBBTUI (ORCPT ); Mon, 2 Feb 2015 14:20:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="448831344" Date: Mon, 2 Feb 2015 21:20:03 +0200 From: Jarkko Sakkinen To: Scot Doyle Cc: Peter Huewe , Ashley Lai , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, josh@joshtriplett.org, christophe.ricard@gmail.com, jason.gunthorpe@obsidianresearch.com, stefanb@linux.vnet.ibm.com, linux-api@vger.kernel.org, trousers-tech@lists.sourceforge.net Subject: Re: [PATCH v2] tpm: fix suspend/resume paths for TPM 2.0 Message-ID: <20150202192003.GA27457@intel.com> References: <1422510227-23256-1-git-send-email-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Are we good with this? /Jarkko On Thu, Jan 29, 2015 at 06:43:12PM +0000, Scot Doyle wrote: > On Thu, 29 Jan 2015, Jarkko Sakkinen wrote: > > Fixed suspend/resume paths for TPM 2.0 and consolidated all the > > associated code to the tpm_pm_suspend() and tpm_pm_resume() > > functions. Resume path should be handled by the firmware, i.e. > > Startup(CLEAR) for hibernate and Startup(STATE) for suspend. > > > > There might be some non-PC embedded devices in the future where > > Startup() is not the handled by the FW but fixing the code for > > those IMHO should be postponed until there is hardware available > > to test the fixes although extra Startup in the driver code is > > essentially a NOP. > > > > Added Shutdown(CLEAR) to the remove paths of TIS and CRB drivers. > > Changed tpm2_shutdown() to a void function because there isn't > > much you can do except print an error message if this fails with > > a system error. > > > > Reported-by: Peter Hüwe > > Signed-off-by: Jarkko Sakkinen > > --- > > drivers/char/tpm/tpm-interface.c | 6 ++++-- > > drivers/char/tpm/tpm.h | 2 +- > > drivers/char/tpm/tpm2-cmd.c | 19 +++++++++++-------- > > drivers/char/tpm/tpm_crb.c | 20 +++++--------------- > > drivers/char/tpm/tpm_tis.c | 26 +++++++++++++------------- > > 5 files changed, 34 insertions(+), 39 deletions(-) > > Resume still functions on TPM 1.2 chip, with and without CONFIG_TCG_CRB. > > Tested-by: Scot Doyle