alistair23-linux/drivers/char
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
..
agp agp: Fix up email address & attributions in AGP MODULE_AUTHOR tags 2014-12-23 20:03:10 +10:00
hw_random Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ipmi ipmi: Fix compile warning with tv_usec 2014-12-30 13:34:36 -06:00
mwave
pcmcia char: synclink: Remove WARN_ON for bad port count 2014-07-10 16:07:46 -07:00
tpm tpm: fix suspend/resume paths for TPM 2.0 2015-02-15 16:56:49 +01:00
xilinx_hwicap char: xilinx_hwicap: Remove .owner field for driver 2014-09-23 23:13:13 -07:00
xillybus char: xillybus: drop owner assignment from platform_drivers 2014-10-20 16:20:21 +02:00
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
bsr.c bsr: avoid format string leaking into device name 2014-07-09 16:59:15 -07:00
ds1302.c
ds1620.c
dsp56k.c drivers/char/dsp56k.c: drop check for negativity of unsigned parameter 2014-07-17 18:38:37 -07:00
dtlk.c
efirtc.c
generic_nvram.c
genrtc.c
hangcheck-timer.c hangcheck-timer: cleanup casting in hangcheck_init() 2014-11-07 11:24:01 -08:00
hpet.c
i8k.c i8k: Fix temperature bug handling in i8k_get_temp() 2014-11-26 19:29:36 -08:00
Kconfig xillybus: Move out of staging 2014-09-23 23:44:16 -07:00
lp.c
Makefile xillybus: Move out of staging 2014-09-23 23:44:16 -07:00
mbcs.c
mbcs.h
mem.c /dev/mem: Use more consistent data types 2014-11-10 15:59:21 +01:00
misc.c Revert "misc: always assign miscdevice to file->private_data in open()" 2014-11-14 16:49:49 -08:00
mmtimer.c
msm_smd_pkt.c
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
random.c This adds a memzero_explicit() call which is guaranteed not to be 2014-10-24 12:33:32 -07:00
raw.c Return short read or 0 at end of a raw device, not EIO 2014-10-31 06:33:26 -04:00
rtc.c
scx200_gpio.c
snsc.c
snsc.h
snsc_event.c
sonypi.c char: drop owner assignment from platform_drivers 2014-10-20 16:20:19 +02:00
tb0219.c char: drop owner assignment from platform_drivers 2014-10-20 16:20:19 +02:00
tile-srom.c char: tile-srom: Add real platform bus parent 2014-10-02 10:19:34 -04:00
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio_console: fix sparse warnings 2014-12-09 12:06:33 +02:00