• Jarkko Sakkinen's avatar
    tpm_crb: fix crb_req_canceled behavior · 87d6616d
    Jarkko Sakkinen authored
    commit 72fd50e14e46dc0edf360631bdece87c2f066a97 upstream.
    
    The req_canceled() callback is used by tpm_transmit() periodically to
    check whether the request has been canceled while it is receiving a
    response from the TPM.
    
    The TPM_CRB_CTRL_CANCEL register was cleared already in the crb_cancel
    callback, which has two consequences:
    
    * Cancel might not happen.
    * req_canceled() always returns zero.
    
    A better place to clear the register is when starting to send a new
    command. The behavior of TPM_CRB_CTRL_CANCEL is described in the
    section 5.5.3.6 of the PTP specification.
    
    Fixes: 30fc8d13 ("tpm: TPM 2.0 CRB Interface")
    Signed-off-by: 's avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    87d6616d
Name
Last commit
Last update
..
agp Loading commit data...
hw_random Loading commit data...
ipmi Loading commit data...
mwave Loading commit data...
pcmcia Loading commit data...
tpm Loading commit data...
xilinx_hwicap Loading commit data...
xillybus Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
apm-emulation.c Loading commit data...
applicom.c Loading commit data...
applicom.h Loading commit data...
bfin-otp.c Loading commit data...
bsr.c Loading commit data...
ds1302.c Loading commit data...
ds1620.c Loading commit data...
dsp56k.c Loading commit data...
dtlk.c Loading commit data...
efirtc.c Loading commit data...
generic_nvram.c Loading commit data...
hangcheck-timer.c Loading commit data...
hpet.c Loading commit data...
lp.c Loading commit data...
mbcs.c Loading commit data...
mbcs.h Loading commit data...
mem.c Loading commit data...
misc.c Loading commit data...
mmtimer.c Loading commit data...
mspec.c Loading commit data...
nsc_gpio.c Loading commit data...
nvram.c Loading commit data...
nwbutton.c Loading commit data...
nwbutton.h Loading commit data...
nwflash.c Loading commit data...
pc8736x_gpio.c Loading commit data...
powernv-op-panel.c Loading commit data...
ppdev.c Loading commit data...
ps3flash.c Loading commit data...
random.c Loading commit data...
raw.c Loading commit data...
rtc.c Loading commit data...
scx200_gpio.c Loading commit data...
snsc.c Loading commit data...
snsc.h Loading commit data...
snsc_event.c Loading commit data...
sonypi.c Loading commit data...
tb0219.c Loading commit data...
tile-srom.c Loading commit data...
tlclk.c Loading commit data...
toshiba.c Loading commit data...
ttyprintk.c Loading commit data...
uv_mmtimer.c Loading commit data...
virtio_console.c Loading commit data...