]> git.itanic.dy.fi Git - linux-stable/commit
tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers
authorJarkko Sakkinen <jarkko@kernel.org>
Wed, 26 Apr 2023 18:49:37 +0000 (21:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 13:17:20 +0000 (14:17 +0100)
commit72c82b652191b0d4aec491a69e422db5b3a8cc4c
tree77550f78d01636a62a1e257c4f256d592e3c749d
parentfde5ff4e14e7c9878f85321753d8861f0908f11a
tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers

[ Upstream commit 0c8862de05c1a087795ee0a87bf61a6394306cc0 ]

TPM chip bootstrapping was removed from tpm_chip_register(), and it
was relocated to tpm_tis_core. This breaks all drivers which are not
based on tpm_tis because the chip will not get properly initialized.

Take the corrective steps:
1. Rename tpm_chip_startup() as tpm_chip_bootstrap() and make it one-shot.
2. Call tpm_chip_bootstrap() in tpm_chip_register(), which reverts the
   things  as tehy used to be.

Cc: Lino Sanfilippo <l.sanfilippo@kunbus.com>
Fixes: 548eb516ec0f ("tpm, tpm_tis: startup chip before testing for interrupts")
Reported-by: Pengfei Xu <pengfei.xu@intel.com>
Link: https://lore.kernel.org/all/ZEjqhwHWBnxcaRV5@xpf.sh.intel.com/
Tested-by: Pengfei Xu <pengfei.xu@intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Stable-dep-of: 99d464506255 ("tpm: Prevent hwrng from activating during resume")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/tpm/tpm-chip.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm_tis_core.c
include/linux/tpm.h