From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: John Hughes <john@atlantech.com>,
Jeff Layton <jlayton@poochiereds.net>,
linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net,
Rajiv Andrade <srajiv@linux.vnet.ibm.com>,
Eric Paris <eparis@redhat.com>
Subject: Re: [Sony Vaio TX3] TPM chip prevents machine from suspending a second time
Date: Mon, 23 Jan 2012 15:52:51 -0500 [thread overview]
Message-ID: <4F1DC8A3.60901@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120121170157.GA18053@burratino>
On 01/21/2012 12:01 PM, Jonathan Nieder wrote:
> Hi Stefan et al,
>
> John Hughes wrote[1]:
>
>> On a sony vaio tx3 when tpm_tis is loaded suspend only works once.
>
>> Well, we now could (once) probe the TPM after the resume and send a test
>> command to it and see whether it returns error code 38 and if so send
>> the TPM_Startup() from the driver -- as a work-around for your broken BIOS.
> Versions tested and found to exhibit the problem:
>
> - Debian 2.6.35~rc6-1~experimental.1 (close to v2.6.35-rc6)
> - Debian 2.6.36-1~experimental.1 (close to v2.6.36)
> - Debian 2.6.37~rc5-1~experimental.3 (close to v2.6.37-rc5)
> - Debian 2.6.37-1 (close to v2.6.37)
> - v3.2-rc2 + Vaio keyboard fixes
> - Debian 3.2.1-1 (close to v3.2.1)
> - v3.3-rc1 + Vaio keyboard fixes
>
> Known problem? Any hints for getting this to work out of the box? (If
> there's no generic fix, maybe it would be possible to use a quirks
> table of some kind?)
Can you apply the patch below to your tpm_tis.c (or somewhere else in
the kernel) and let me/us know what it reports in 'dmesg' upon a
'modprobe tpm_tis'? You can cut out serial numbers and UUIDs if you
want. I am also not sure whether it's a good idea to use DMI information
for quirks in general, but the idea would be to have a table of systems
with known problems, identify them using their SMBIOS information and
only apply the work-arounds to them. As stated previously what needs to
be sent upon resume is a TPM_Startup(ST_STATE). Even though it shouldn't
hurt to send this command two times to the TPM in general (from BIOS and
Linux) even on working machines I don't want to find out about side
effects ... for sure that would be much easier and much less code...
Stefan
---
drivers/char/tpm/tpm_tis.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6/drivers/char/tpm/tpm_tis.c
===================================================================
--- linux-2.6.orig/drivers/char/tpm/tpm_tis.c
+++ linux-2.6/drivers/char/tpm/tpm_tis.c
@@ -27,6 +27,7 @@
#include <linux/wait.h>
#include <linux/acpi.h>
#include <linux/freezer.h>
+#include <linux/dmi.h>
#include "tpm.h"
enum tis_access {
@@ -535,6 +536,10 @@ static int tpm_tis_init(struct device *d
vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
+ for (i = 0; i < DMI_STRING_MAX; i++)
+ dev_info(dev, "dmi: %d: %s\n",
+ i, dmi_get_system_info(i));
+
dev_info(dev,
"1.2 TPM (device-id 0x%X, rev-id %d)\n",
vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0)));
next prev parent reply other threads:[~2012-01-23 20:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 14:08 TPM chip prevents machine from suspending Jeff Layton
2011-03-28 17:25 ` Stefan Berger
2011-03-28 18:12 ` Jeff Layton
2011-03-28 19:45 ` Jeff Layton
2011-03-28 19:57 ` Sisir Koppaka
2011-03-28 20:16 ` Jeff Layton
2011-03-28 20:32 ` Sisir Koppaka
2011-03-28 23:10 ` Stefan Berger
2011-03-29 0:19 ` Stefan Berger
2011-03-29 12:08 ` Jeff Layton
2011-03-29 12:25 ` Stefan Berger
2011-03-29 12:30 ` Jeff Layton
2011-03-29 14:30 ` Rajiv Andrade
2011-03-29 15:03 ` Stefan Berger
2011-03-30 19:43 ` [tpmdd-devel] " Eric Paris
2012-01-21 17:01 ` [Sony Vaio TX3] TPM chip prevents machine from suspending a second time Jonathan Nieder
2012-01-23 20:52 ` Stefan Berger [this message]
2012-01-29 10:49 ` John Hughes
2012-01-29 18:22 ` Stefan Berger
2012-01-30 9:10 ` John Hughes
2012-02-26 15:44 ` Jonathan Nieder
2012-05-03 15:34 ` John Hughes
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=4F1DC8A3.60901@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=eparis@redhat.com \
--cc=jlayton@poochiereds.net \
--cc=john@atlantech.com \
--cc=jrnieder@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srajiv@linux.vnet.ibm.com \
--cc=tpmdd-devel@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;
as well as URLs for NNTP newsgroup(s).