summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJonathan McDowell <noodles@meta.com>2025-03-12 08:26:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-25 11:43:34 +0300
commitb79faed2894a9453ad95c22b1e31a123e6518ae1 (patch)
tree4125b552c7bc398ef91ba25baeea6d274c037d09 /include/linux
parent1a5b71022e7210797d15a7f2cb099432901de937 (diff)
downloadlinux-b79faed2894a9453ad95c22b1e31a123e6518ae1.tar.xz
tpm, tpm_tis: Workaround failed command reception on Infineon devices
[ Upstream commit de9e33df7762abbfc2a1568291f2c3a3154c6a9d ] 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: Jonathan McDowell <noodles@meta.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tpm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index df5cd4245f29..dd0784a6e07d 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -271,6 +271,7 @@ enum tpm2_cc_attrs {
#define TPM_VID_WINBOND 0x1050
#define TPM_VID_STM 0x104A
#define TPM_VID_ATML 0x1114
+#define TPM_VID_IFX 0x15D1
enum tpm_chip_flags {
TPM_CHIP_FLAG_BOOTSTRAPPED = BIT(0),