[kernel] tpm-fix-stall-on-boot.patch: attempt to fix stalls during boot (#530393)

Chuck Ebbert cebbert at fedoraproject.org
Thu Sep 2 13:46:13 UTC 2010


commit e9ce60f6ef994c8f98c09d8ebc812fea87ca395c
Author: Chuck Ebbert <cebbert at redhat.com>
Date:   Thu Sep 2 09:46:36 2010 -0400

    tpm-fix-stall-on-boot.patch: attempt to fix stalls during boot (#530393)

 kernel.spec                 |    6 ++++++
 tpm-fix-stall-on-boot.patch |   24 ++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index a99309d..144ac18 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 at 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 at 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 0000000..adba40a
--- /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);
+ 
+


More information about the scm-commits mailing list