Commit b79faed2 authored by Jonathan McDowell's avatar Jonathan McDowell Committed by Greg Kroah-Hartman
Browse files

tpm, tpm_tis: Workaround failed command reception on Infineon devices

[ Upstream commit de9e33df ]

Some Infineon devices have a issue where the status register will get
stuck with a quick REQUEST_USE / COMMAND_READY sequence. This is not
simply a matter of requiring a longer timeout; the work around is to
retry the command submission. Add appropriate logic to do this in the
send path.

This is fixed in later firmware revisions, but those are not always
available, and cannot generally be easily updated from outside a
firmware environment.

Testing has been performed with a simple repeated loop of doing a
TPM2_CC_GET_CAPABILITY for TPM_CAP_PROP_MANUFACTURER using the Go code
at:

  https://the.earth.li/~noodles/tpm-stuff/timeout-reproducer-simple.go



It can take several hours to reproduce, and several million operations.

Signed-off-by: default avatarJonathan McDowell <noodles@meta.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1a5b7102
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment