From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Scot Doyle <lkml14@scotdoyle.com>
Cc: peterhuewe@gmx.de, ashley@ashleylai.com,
christophe.ricard@gmail.com,
jason.gunthorpe@obsidianresearch.com, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net,
trousers-tech@lists.sourceforge.net
Subject: Re: [tpmdd-devel] [PATCH] tpm: fix suspend/resume paths for TPM 2.0
Date: Tue, 27 Jan 2015 18:57:22 +0200 [thread overview]
Message-ID: <1422377842.2912.1.camel@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1501271620520.1725@localhost.localdomain>
On Tue, 2015-01-27 at 16:52 +0000, Scot Doyle wrote:
> On Tue, 27 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.
> >
> > Reported-by: Peter Hüwe <PeterHuewe@gmx.de>
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > ---
>
> ...
>
> > --- a/drivers/char/tpm/tpm_tis.c
> > +++ b/drivers/char/tpm/tpm_tis.c
> > @@ -865,25 +865,23 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
> > static int tpm_tis_resume(struct device *dev)
> > {
>
> ...
>
> > + /* TPM 1.2 requires self-test on resume. */
> > + if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) {
> > + ret = tpm_do_selftest(chip);
> > + if (ret < 0)
> > + return ret;
>
> Just to note, the return value from tpm_do_selftest() on TPM 1.2 chips was
> previously ignored. Mine does return 0.
Right. I can update the patch to ignore return value if the majority
wants that.
/Jarkko
next prev parent reply other threads:[~2015-01-27 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 11:02 [PATCH] tpm: fix suspend/resume paths for TPM 2.0 Jarkko Sakkinen
2015-01-27 16:52 ` [tpmdd-devel] " Scot Doyle
2015-01-27 16:57 ` Jarkko Sakkinen [this message]
2015-01-27 17:03 ` Jason Gunthorpe
2015-01-27 17:23 ` Jarkko Sakkinen
2015-01-27 17:33 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422377842.2912.1.camel@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=ashley@ashleylai.com \
--cc=christophe.ricard@gmail.com \
--cc=jason.gunthorpe@obsidianresearch.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml14@scotdoyle.com \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=trousers-tech@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox