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)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 15 May 2023 23:43:12 +0000 (02:43 +0300)
commit1398aa803f198b7a386fdd8404666043e95f4c16
treee183a9a7c77b4e9c86aa760e447776a445ca455a
parentf1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6
tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume

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: a3fbfae82b4c ("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>
drivers/char/tpm/tpm_tis_core.c