]> git.baikalelectronics.ru Git - kernel.git/commit
tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume
authorJarkko Sakkinen <jarkko@kernel.org>
Wed, 26 Apr 2023 17:29:27 +0000 (20:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 13:03:16 +0000 (14:03 +0100)
commitd893ffa87a5731ab2505f18651b9bfb0a6d9158a
tree93476536d080e02955a2b45211fda2d7be30d53a
parent8c6970a03670879b87d0f85e7b7516b37c85915a
tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume

[ Upstream commit 1398aa803f198b7a386fdd8404666043e95f4c16 ]

Before sending a TPM command, CLKRUN protocol must be disabled. This is not
done in the case of tpm1_do_selftest() call site inside tpm_tis_resume().

Address this by decorating the calls with tpm_chip_{start,stop}, which
should be always used to arm and disarm the TPM chip for transmission.

Finally, move the call to the main TPM driver callback as the last step
because it should arm the chip by itself, if it needs that type of
functionality.

Cc: stable@vger.kernel.org
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Closes: https://lore.kernel.org/linux-integrity/CS68AWILHXS4.3M36M1EKZLUMS@suppilovahvero/
Fixes: 5c5b996c8cb9 ("tpm: take TPM chip power gating out of tpm_transmit()")
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/tpm/tpm_tis_core.c