diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-01 16:23:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-01 16:23:27 -0500 |
commit | 8d1dc20e8d689c7e6a0a4d2c94e36a99d5793ecb (patch) | |
tree | a25396484b9e824179bbc8f657f895b9540a38ae /drivers | |
parent | 3e1f2356ce231488dc1fa844e5ce91bcb59fc2a1 (diff) |
Revert "TPM: Long default timeout fix"
This reverts commit c4ff4b829ef9e6353c0b133b7adb564a68054979.
Ted Ts'o reports:
"TPM is working for me so I can log into employer's network in 2.6.37.
It broke when I tried 2.6.38-rc6, with the following relevant lines
from my dmesg:
[ 11.081627] tpm_tis 00:0b: 1.2 TPM (device-id 0x0, rev-id 78)
[ 25.734114] tpm_tis 00:0b: Operation Timed out
[ 78.040949] tpm_tis 00:0b: Operation Timed out
This caused me to get suspicious, especially since the _other_ TPM
commit in 2.6.38 had already been reverted, so I tried reverting
commit c4ff4b829e: "TPM: Long default timeout fix". With this commit
reverted, my TPM on my Lenovo T410 is once again working."
Requested-and-tested-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/tpm/tpm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 36e0fa161c2b..1f46f1cd9225 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -364,14 +364,12 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, | |||
364 | tpm_protected_ordinal_duration[ordinal & | 364 | tpm_protected_ordinal_duration[ordinal & |
365 | TPM_PROTECTED_ORDINAL_MASK]; | 365 | TPM_PROTECTED_ORDINAL_MASK]; |
366 | 366 | ||
367 | if (duration_idx != TPM_UNDEFINED) { | 367 | if (duration_idx != TPM_UNDEFINED) |
368 | duration = chip->vendor.duration[duration_idx]; | 368 | duration = chip->vendor.duration[duration_idx]; |
369 | /* if duration is 0, it's because chip->vendor.duration wasn't */ | 369 | if (duration <= 0) |
370 | /* filled yet, so we set the lowest timeout just to give enough */ | ||
371 | /* time for tpm_get_timeouts() to succeed */ | ||
372 | return (duration <= 0 ? HZ : duration); | ||
373 | } else | ||
374 | return 2 * 60 * HZ; | 370 | return 2 * 60 * HZ; |
371 | else | ||
372 | return duration; | ||
375 | } | 373 | } |
376 | EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration); | 374 | EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration); |
377 | 375 | ||