summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel.spec6
-rw-r--r--tpm-fix-stall-on-boot.patch24
2 files changed, 30 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index a99309db0..144ac1813 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -693,6 +693,8 @@ Patch12018: neuter_intel_microcode_load.patch
Patch12020: alsa-fix-substream-proc-status-read.patch
+Patch12030: tpm-fix-stall-on-boot.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1264,6 +1266,9 @@ ApplyPatch disable-i8042-check-on-apple-mac.patch
ApplyPatch neuter_intel_microcode_load.patch
+# try to fix stalls during boot (#530393)
+ApplyPatch tpm-fix-stall-on-boot.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -1873,6 +1878,7 @@ fi
%changelog
* Thu Sep 02 2010 Chuck Ebbert <cebbert@redhat.com> - 2.6.36-0.15.rc3.git0
- Add patch from ALSA mailing list to try to fix bug #628404
+- tpm-fix-stall-on-boot.patch: attempt to fix stalls during boot (#530393)
* Wed Sep 01 2010 Kyle McMartin <kyle@redhat.com> - 2.6.36-0.14.rc3.git0
- Fix icebp breakpoints, patch from Frederic Weisbecker.
diff --git a/tpm-fix-stall-on-boot.patch b/tpm-fix-stall-on-boot.patch
new file mode 100644
index 000000000..adba40a6e
--- /dev/null
+++ b/tpm-fix-stall-on-boot.patch
@@ -0,0 +1,24 @@
+Fix TPM timeouts on boot (#530393)
+
+--- a/drivers/char/tpm/tpm.c
++++ a/drivers/char/tpm/tpm.c
+@@ -354,12 +354,14 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip,
+ tpm_protected_ordinal_duration[ordinal &
+ TPM_PROTECTED_ORDINAL_MASK];
+
+- if (duration_idx != TPM_UNDEFINED)
++ if (duration_idx != TPM_UNDEFINED) {
+ duration = chip->vendor.duration[duration_idx];
+- if (duration <= 0)
++ /* if duration is 0, it's because chip->vendor.duration wasn't */
++ /* filled yet, so we set the lowest timeout just to give enough */
++ /* time to tpm_get_timeouts() succeed */
++ return (duration <= 0 ? HZ : duration);
++ } else
+ return 2 * 60 * HZ;
+- else
+- return duration;
+ }
+ EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
+
+