linux/drivers/char
Jarkko Sakkinen 15726df8c0 tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality()
commit a5665ec2affdba21bff3b0d4d3aed83b3951e8ff upstream.

This is shown with Samsung Chromebook Pro (Caroline) with TPM 1.2
(SLB 9670):

[    4.324298] TPM returned invalid status
[    4.324806] WARNING: CPU: 2 PID: 1 at drivers/char/tpm/tpm_tis_core.c:275 tpm_tis_status+0x86/0x8f

Background
==========

TCG PC Client Platform TPM Profile (PTP) Specification, paragraph 6.1 FIFO
Interface Locality Usage per Register, Table 39 Register Behavior Based on
Locality Setting for FIFO - a read attempt to TPM_STS_x Registers returns
0xFF in case of lack of locality.

The fix
=======

Decorate tpm_get_timeouts() with request_locality() and release_locality().

Fixes: a3fbfae82b ("tpm: take TPM chip power gating out of tpm_transmit()")
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Laurent Bigonville <bigon@debian.org>
Cc: stable@vger.kernel.org
Reported-by: Lukasz Majczak <lma@semihalf.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-09 11:09:36 +01:00
..
agp agp/intel: Fix a memory leak on module initialisation failure 2020-08-19 08:16:05 +02:00
hw_random hwrng: timeriomem - Fix cooldown period calculation 2021-03-04 10:26:24 +01:00
ipmi ipmi_si: Fix wrong return value in try_smi_init() 2020-10-29 09:57:44 +01:00
mwave
pcmcia
tpm tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality() 2021-03-09 11:09:36 +01:00
xilinx_hwicap
xillybus
Kconfig
Makefile
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
hangcheck-timer.c
hpet.c
lp.c
mem.c
misc.c
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c
ps3flash.c
random.c random: fix the RNDRESEEDCRNG ioctl 2021-03-04 10:26:11 +01:00
raw.c
rtc.c
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c drivers: char: tlclk.c: Avoid data race between init and interrupt handler 2020-10-01 13:17:56 +02:00
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio: virtio_console: fix DMA memory allocation for rproc serial 2020-11-18 19:20:29 +01:00