Commit 292cf4a8 authored by Valdis Kletnieks's avatar Valdis Kletnieks Committed by Linus Torvalds
Browse files

tpm: work around bug in Broadcom BCM0102 chipset

Patch tpm-correct-tpm-timeouts-to-jiffies-conversion reveals a bug in the
Broadcom BCM0102 TPM chipset used in the Dell Latitude D820 - although
most of the timeouts are returned in usecs as per the spec, one is
apparently returned in msecs, which results in a too-small value leading
to a timeout when the code treats it as usecs.  To prevent a regression,
we check for the known too-short value and adjust it to a value that makes
things work.
Signed-off-by: default avatarValdis Kletnieks <>
Cc: Marcin Obara <>
Cc: Marcel Selhorst <>
Cc: Kylene Jo Hall <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 9e5b1b12
......@@ -557,6 +557,13 @@ duration:
(*((__be32 *) (data +
/* The Broadcom BCM0102 chipset in a Dell Latitude D820 gets the above
* value wrong and apparently reports msecs rather than usecs. So we
* fix up the resulting too-small TPM_SHORT value to make things work.
if (chip->vendor.duration[TPM_SHORT] < (HZ/100))
chip->vendor.duration[TPM_SHORT] = HZ;
chip->vendor.duration[TPM_MEDIUM] =
(*((__be32 *) (data +
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment