tpm: Provide a generic means to override the chip returned timeouts
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Thu, 22 May 2014 00:26:44 +0000 (18:26 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:19:08 +0000 (09:19 -0700)
commit8b5a02ed633c1bfa97359abcd098aac689c1ca9b
treef995f1102fb984b59fa751a819affcd19dcc6880
parent9124fa935352e7041fbd5e2ba9574aa32b61e97c
tpm: Provide a generic means to override the chip returned timeouts

commit 8e54caf407b98efa05409e1fee0e5381abd2b088 upstream.

Some Atmel TPMs provide completely wrong timeouts from their
TPM_CAP_PROP_TIS_TIMEOUT query. This patch detects that and returns
new correct values via a DID/VID table in the TIS driver.

Tested on ARM using an AT97SC3204T FW version 37.16

[PHuewe: without this fix these 'broken' Atmel TPMs won't function on
older kernels]
Signed-off-by: "Berg, Christopher" <Christopher.Berg@atmel.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm-interface.c
drivers/char/tpm/tpm_tis.c
include/linux/tpm.h