linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Subject: Re: [Regression] Commit "tpm: Introduce function to poll for result of self test" breaks suspend
Date: Sun, 15 Jan 2012 21:27:07 -0500	[thread overview]
Message-ID: <4F138AFB.8040601@linux.vnet.ibm.com> (raw)
In-Reply-To: <201201160022.07176.rjw@sisk.pl>

On 01/15/2012 06:22 PM, Rafael J. Wysocki wrote:
> Hi Stefan,
>
Hi Rafael,
> Unfortunately, the following commit from you:
>
> commit 68d6e6713fcb2ea6278661aaaf5f1c9c821b3751
> Author: Stefan Berger<stefanb@linux.vnet.ibm.com>
> Date:   Fri Nov 11 12:57:04 2011 -0500
>
>      tpm: Introduce function to poll for result of self test
>
>      This patch introduces a function that runs the TPM_ContinueSelfTest()
>      function and then polls the TPM to check whether it finished the selftest
>      and can receive new commands.
>
>      Signed-off-by: Stefan Berger<stefanb@linux.vnet.ibm.com>
>
> broke suspend on my Toshiba Portege R500.  It causes the tpm driver to
> return an error code from .suspend() on every attempt to suspend the system.
>

Can you show what the error output is?
Strange enough this function is not called during a suspend but during 
boot and again during resume. Can you try the following after a boot

cd /sys/devices
find -name pcrs | xargs cat

and see whether this displays 24 PCRs. This sends a couple of commands 
to the TPM. Then try a suspend. Did this help anything? If yes, can you 
run above commands again?

FYI: TPM_ContinueSelfTest is the only TPM function that triggers an 
asynchronous action of the TPM, here the continuation of its self test. 
To prevent subsequent commands sent to the TPM from failing due to the 
ongoing self test, we are now waiting for this command to finish. None 
of the machines that I tested it with had a TPM that actually did 
anything during the TPM_ContinueSelfTest() but must have fully completed 
their selftest during TPM_SelfTest() sent to it by the BIOS.

> Revertig this commit on top of the current Linus' tree fixes the problem for me.
>
> If necessary, I'll collect more information about this problem tomorrow.

The output of 'caps' would be interesting in the same dir as pcrs:

cd /sys/devices
find -name caps | xargs cat

    Stefan


  reply	other threads:[~2012-01-16  2:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 23:22 [Regression] Commit "tpm: Introduce function to poll for result of self test" breaks suspend Rafael J. Wysocki
2012-01-16  2:27 ` Stefan Berger [this message]
2012-01-16 20:42   ` Rafael J. Wysocki
2012-01-16 21:15     ` Stefan Berger
2012-01-16 22:05       ` Rafael J. Wysocki
2012-01-16 22:43         ` Stefan Berger
2012-01-16 22:50           ` Rafael J. Wysocki
2012-01-16 23:50             ` Stefan Berger
2012-01-17 22:13               ` Rafael J. Wysocki

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=4F138AFB.8040601@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=srajiv@linux.vnet.ibm.com \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).