linux/drivers/char/tpm
Jarkko Sakkinen 74d6b3ceaa tpm: fix suspend/resume paths for TPM 2.0
Fixed suspend/resume paths for TPM 2.0 and consolidated all the
associated code to the tpm_pm_suspend() and tpm_pm_resume()
functions. Resume path should be handled by the firmware, i.e.
Startup(CLEAR) for hibernate and Startup(STATE) for suspend.

There might be some non-PC embedded devices in the future where
Startup() is not the handled by the FW but fixing the code for
those IMHO should be postponed until there is hardware available
to test the fixes although extra Startup in the driver code is
essentially a NOP.

Added Shutdown(CLEAR) to the remove paths of TIS and CRB drivers.
Changed tpm2_shutdown() to a void function because there isn't
much you can do except print an error message if this fails with
a system error.

Fixes: aec04cbdf7 ("tpm: TPM 2.0 FIFO Interface")
Fixes: 30fc8d138e ("tpm: TPM 2.0 CRB Interface")
[phuewe: both did send TPM_Shutdown on resume which 'disables' the TPM
and did not send TPM2_Shutdown on teardown which leads some TPM2.0 to
believe there was an attack (no TPM2_Shutdown = no orderly shutdown =
attack)]

Reported-by: Peter Hüwe <PeterHuewe@gmx.de>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Scot Doyle <lkml14@scotdoyle.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
2015-02-15 16:56:49 +01:00
..
Kconfig tpm: TPM 2.0 CRB Interface 2015-01-17 14:00:12 +01:00
Makefile tpm: TPM 2.0 CRB Interface 2015-01-17 14:00:12 +01:00
tpm2-cmd.c tpm: fix suspend/resume paths for TPM 2.0 2015-02-15 16:56:49 +01: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: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_atmel.h tpmdd maintainers 2007-08-22 19:52:44 -07:00
tpm_crb.c tpm: fix suspend/resume paths for TPM 2.0 2015-02-15 16:56:49 +01:00
tpm_eventlog.c tpm: simplify code by using %*phN specifier 2014-07-29 23:10:56 +02:00
tpm_eventlog.h drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_i2c_atmel.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_i2c_infineon.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_i2c_nuvoton.c tpm: device class for tpm 2015-01-17 14:00:10 +01:00
tpm_i2c_stm_st33.c char/tpm: fixed white spaces coding style issues 2015-01-18 14:26:49 +01:00
tpm_ibmvtpm.c tpm: two-phase chip management functions 2015-01-17 14:00:09 +01:00
tpm_ibmvtpm.h tpm_ibmvtpm: Update email address in maintainers list and ibmvtpm driver 2015-01-17 14:00:09 +01:00
tpm_infineon.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_nsc.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_of.c tpm_ibmvtpm: Update email address in maintainers list and ibmvtpm driver 2015-01-17 14:00:09 +01:00
tpm_ppi.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_tis.c tpm: fix suspend/resume paths for TPM 2.0 2015-02-15 16:56:49 +01:00
tpm-chip.c tpm: fix format string error in tpm-chip.c 2015-01-20 21:28:36 +01:00
tpm-dev.c tpm: device class for tpm 2015-01-17 14:00:10 +01:00
tpm-interface.c tpm: fix suspend/resume paths for TPM 2.0 2015-02-15 16:56:49 +01:00
tpm-sysfs.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm.h tpm: fix suspend/resume paths for TPM 2.0 2015-02-15 16:56:49 +01:00
xen-tpmfront.c tpm: two-phase chip management functions 2015-01-17 14:00:09 +01:00