All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203
@ 2017-01-12 18:08 ` Maciej S. Szmigiero
  0 siblings, 0 replies; 12+ messages in thread
From: Maciej S. Szmigiero @ 2017-01-12 18:08 UTC (permalink / raw)
  To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Christophe Ricard, linux-kernel

Since commit 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM
access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no
longer works.
It turns out the initialization proceeds fine until we get and start using
chip-reported timeouts - and the chip reports C and D timeouts of zero.

Since these are clearly not long enough let's add an override for them
to TPM TIS default values, just as we do for Atmel 3204.
A and B timeouts are set to the same values as the chip normally reports.

Signed-off-by: Maciej S. Szmigiero <mail-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>

Fixes: 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access")
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/char/tpm/tpm_tis_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 7993678954a2..e42e5a6a3c2f 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -421,6 +421,9 @@ struct tis_vendor_timeout_override {
 };
 
 static const struct tis_vendor_timeout_override vendor_timeout_overrides[] = {
+	/* Atmel 3203 */
+	{ 0x32031114, { (10*1000), (10*1000),
+			(TIS_SHORT_TIMEOUT*1000), (TIS_SHORT_TIMEOUT*1000) } },
 	/* Atmel 3204 */
 	{ 0x32041114, { (TIS_SHORT_TIMEOUT*1000), (TIS_LONG_TIMEOUT*1000),
 			(TIS_SHORT_TIMEOUT*1000), (TIS_SHORT_TIMEOUT*1000) } },


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-01-13 15:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-12 18:08 [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203 Maciej S. Szmigiero
2017-01-12 18:08 ` Maciej S. Szmigiero
     [not found] ` <08953fb6-c332-ef29-2614-6335570023be-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
2017-01-12 18:42   ` Jason Gunthorpe
2017-01-12 18:42     ` Jason Gunthorpe
2017-01-12 20:09     ` Maciej S. Szmigiero
2017-01-12 20:19       ` Jason Gunthorpe
     [not found]       ` <259e1606-255b-5bf4-54bb-1bed967c228a-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
2017-01-12 20:20         ` Jarkko Sakkinen
2017-01-12 20:20           ` Jarkko Sakkinen
     [not found]           ` <20170112202055.uxabnu553qwqql72-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-12 21:37             ` Maciej S. Szmigiero
2017-01-12 21:37               ` Maciej S. Szmigiero
     [not found]               ` <20f8645d-f3fd-550b-b830-d1e55b8f2d17-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
2017-01-13 15:50                 ` Jarkko Sakkinen
2017-01-13 15:50                   ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.