linux/drivers/char/tpm
Peter Huewe 2c97f6f20c char/tpm: Check return code of wait_for_tpm_stat
In some weird cases it might be possible that the TPM does not set
STS.VALID within the given timeout time (or ever) but sets STS.EXPECT
(STS=0x0C) In this case the driver gets stuck in the while loop of
tpm_tis_send_data and loops endlessly.

Checking the return value of wait_for_tpm_stat fixes this and the driver
bails out correctly.  While at it fixing all other users since if the
TPM does not manage to set STS.VALID within the reasonable timeframe
something is definitely wrong and the driver should react correctly.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2016-11-28 01:31:30 +02:00
..
st33zp24 tpm/st33zp24: Remove useless tpm_gen_interrupt 2016-09-15 16:04:21 +03:00
Kconfig tpm/tpm_tis_spi: Add support for spi phy 2016-06-25 17:28:57 +03:00
Makefile tpm/tpm_tis_spi: Add support for spi phy 2016-06-25 17:28:57 +03:00
tpm2-cmd.c tpm: use tpm_transmit_cmd() in tpm2_probe() 2016-09-15 16:04:21 +03:00
tpm_acpi.c ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. 2014-05-27 18:13:08 +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 useless priv field in struct tpm_vendor_specific 2016-06-25 17:26:35 +03:00
tpm_crb.c tmp/tpm_crb: implement runtime pm for tpm_crb 2016-11-28 01:31:30 +02:00
tpm_eventlog.c tpm: Get rid of devname 2016-06-25 17:26:35 +03:00
tpm_eventlog.h tpm: fix tpm_bios_log_setup stub prototype 2016-06-25 17:26:35 +03: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: fix for typo in tpm/tpm_ibmvtpm.c 2016-06-25 17:26:35 +03: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 useless priv field in struct tpm_vendor_specific 2016-06-25 17:26:35 +03:00
tpm_of.c TPM: Avoid reference to potentially freed memory 2015-11-09 17:52:55 +02:00
tpm_ppi.c tpm: move the PPI attributes to character device directory. 2015-10-19 01:01:20 +02:00
tpm_tis_core.c char/tpm: Check return code of wait_for_tpm_stat 2016-11-28 01:31:30 +02:00
tpm_tis_core.h tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy 2016-06-25 17:28:57 +03:00
tpm_tis_spi.c tpm/tpm_tis_spi: Add support for spi phy 2016-06-25 17:28:57 +03:00
tpm_tis.c tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy 2016-06-25 17:28:57 +03:00
tpm_vtpm_proxy.c tpm: Factor out common startup code 2016-07-19 17:43:38 +03:00
tpm-chip.c tpm: Factor out common startup code 2016-07-19 17:43:38 +03:00
tpm-dev.c tpm: fix a race condition in tpm2_unseal_trusted() 2016-09-15 16:04:21 +03:00
tpm-interface.c tmp/tpm_crb: implement runtime pm for tpm_crb 2016-11-28 01:31:30 +02:00
tpm-sysfs.c tpm: constify TPM 1.x header structures 2016-09-15 16:04:21 +03:00
tpm.h tpm: replace tpm_gen_interrupt() with tpm_tis_gen_interrupt() 2016-09-15 16:04:21 +03:00
xen-tpmfront.c tpm: Remove useless priv field in struct tpm_vendor_specific 2016-06-25 17:26:35 +03:00