linux/drivers/char/tpm
Alexander Steffen 302a6ad7fc tpm_tis_core: Choose appropriate timeout for reading burstcount
TIS v1.3 for TPM 1.2 and PTP for TPM 2.0 disagree about which timeout
value applies to reading a valid burstcount. It is TIMEOUT_D according to
TIS, but TIMEOUT_A according to PTP, so choose the appropriate value
depending on whether we deal with a TPM 1.2 or a TPM 2.0.

This is important since according to the PTP TIMEOUT_D is much smaller
than TIMEOUT_A. So the previous implementation could run into timeouts
with a TPM 2.0, even though the TPM was behaving perfectly fine.

During tpm2_probe TIMEOUT_D will be used even with a TPM 2.0, because
TPM_CHIP_FLAG_TPM2 is not yet set. This is fine, since the timeout values
will only be changed afterwards by tpm_get_timeouts. Until then
TIS_TIMEOUT_D_MAX applies, which is large enough.

Cc: stable@vger.kernel.org
Fixes: aec04cbdf7 ("tpm: TPM 2.0 FIFO Interface")

Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2017-04-03 22:46:00 +03:00
..
st33zp24 tpm/st33zp24: Remove unneeded linux/miscdevice.h include 2017-01-23 18:28:18 +02:00
Kconfig tpm: enhance TPM 2.0 PCR extend to support multiple banks 2017-02-03 22:03:14 +02:00
Makefile tpm: add securityfs support for TPM 2.0 firmware event log 2017-02-03 22:03:14 +02:00
tpm-chip.c tmp: use pdev for parent device in tpm_chip_alloc 2017-01-23 18:28:18 +02:00
tpm-dev.c tpm: Begin the process to deprecate user_read_timer 2017-02-03 22:03:14 +02:00
tpm-interface.c tpm: Fix expected number of response bytes of TPM1.2 PCR Extend 2017-02-15 20:09:52 +02:00
tpm-sysfs.c tpm: Check size of response before accessing data 2017-01-23 18:28:18 +02:00
tpm.h tpm: declare tpm2_get_pcr_allocation() as static 2017-02-20 13:23:18 +02:00
tpm1_eventlog.c tpm: add securityfs support for TPM 2.0 firmware event log 2017-02-03 22:03:14 +02:00
tpm2-cmd.c tpm: declare tpm2_get_pcr_allocation() as static 2017-02-20 13:23:18 +02:00
tpm2_eventlog.c tpm: add securityfs support for TPM 2.0 firmware event log 2017-02-03 22:03:14 +02:00
tpm_acpi.c tpm: add securityfs support for TPM 2.0 firmware event log 2017-02-03 22:03:14 +02:00
tpm_atmel.c tpm: Remove useless priv field in struct tpm_vendor_specific 2016-06-25 17:26:35 +03:00
tpm_atmel.h tpm: remove tpm_read_index and tpm_write_index from tpm.h 2017-02-03 22:03:14 +02:00
tpm_crb.c tpm, tpm_crb: Handle 64-bit resource in crb_check_resource() 2017-01-23 18:28:18 +02:00
tpm_eventlog.h tpm: add securityfs support for TPM 2.0 firmware event log 2017-02-03 22:03:14 +02:00
tpm_i2c_atmel.c tpm: Factor out common startup code 2016-07-19 17:43:38 +03:00
tpm_i2c_infineon.c tpm: Factor out common startup code 2016-07-19 17:43:38 +03:00
tpm_i2c_nuvoton.c tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family) 2016-07-19 17:43:38 +03:00
tpm_ibmvtpm.c tpm/vtpm: fix kdoc warnings 2017-01-23 18:28:18 +02:00
tpm_ibmvtpm.h tpm_ibmvtpm: properly handle interrupted packet receptions 2015-12-20 15:27:12 +02:00
tpm_infineon.c tpm: Get rid of chip->pdev 2016-06-25 17:26:35 +03:00
tpm_nsc.c tpm: remove tpm_read_index and tpm_write_index from tpm.h 2017-02-03 22:03:14 +02:00
tpm_of.c tpm: enhance read_log_of() to support Physical TPM event log 2017-02-03 22:03:14 +02:00
tpm_ppi.c tpm: move the PPI attributes to character device directory. 2015-10-19 01:01:20 +02:00
tpm_tis.c tpm_tis: fix the error handling of init_tis() 2017-02-14 19:24:33 +02:00
tpm_tis_core.c tpm_tis_core: Choose appropriate timeout for reading burstcount 2017-04-03 22:46:00 +03:00
tpm_tis_core.h tpm_tis: use default timeout value if chip reports it as zero 2017-01-23 18:28:18 +02:00
tpm_tis_spi.c tpm/tpm_tis_spi: drop duplicate header module.h 2017-01-23 18:28:18 +02:00
tpm_vtpm_proxy.c tpm/vtpm: fix kdoc warnings 2017-01-23 18:28:18 +02:00
xen-tpmfront.c tpm xen: drop unneeded chip variable 2017-02-14 19:24:33 +02:00