mirror of https://lore.kernel.org/lkml/
 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
  2017-01-12 18:42 ` Jason Gunthorpe
  0 siblings, 1 reply; 7+ messages in thread
From: Maciej S. Szmigiero @ 2017-01-12 18:08 UTC (permalink / raw)
  To: tpmdd-devel
  Cc: linux-kernel, Peter Huewe, Marcel Selhorst, Jarkko Sakkinen,
	Christophe Ricard, Jason Gunthorpe

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@maciej.szmigiero.name>

Fixes: 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access")
Cc: stable@vger.kernel.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) } },

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

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

Thread overview: 7+ 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:42 ` Jason Gunthorpe
2017-01-12 20:09   ` Maciej S. Szmigiero
2017-01-12 20:19     ` Jason Gunthorpe
2017-01-12 20:20     ` Jarkko Sakkinen
2017-01-12 21:37       ` Maciej S. Szmigiero
2017-01-13 15:50         ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®