summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2026-09-01 16:37:22 -0500
committerJarkko Sakkinen <jarkko@kernel.org>2026-10-23 00:59:20 +0300
commit313acd594a799d6b4b3af937eaca7bf4a1803c4a (patch)
tree9ff1051b45b028b9bf135de20d226b4cc2134149 /scripts/basic
parent6fc1b05077b8ac7c3193616f0bc419f6185988c6 (diff)
downloadlinux-313acd594a799d6b4b3af937eaca7bf4a1803c4a.tar.gz
linux-313acd594a799d6b4b3af937eaca7bf4a1803c4a.zip
tpm: Call cmd_ready/go_idle for each command transmission
Some TPM implementations, particularly fTPM using the CRB interface, require the TPM to transition through idle and ready states for each command rather than once per session. The current implementation calls cmd_ready once during tpm_chip_start() and go_idle once during tpm_chip_stop(). For fTPM, when multiple commands are sent without per-command idle transitions, subsequent commands timeout as the TPM is waiting for the transition. Fix this by calling cmd_ready before each command and go_idle on all exit paths in tpm_try_transmit(). For TPM implementations that don't require per-command transitions, the callbacks return immediately based on the start method. Remove the now-redundant per-session calls from tpm_chip_start() and tpm_chip_stop() along with their helpers. This resolves timeout errors during TPM initialization on systems where BIOS has already performed TPM startup. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/r/20260901213723.3017371-1-mario.limonciello@amd.com Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions