Delay after aborting command in tpm_tis (rhbz #746097)

This commit is contained in:
Dave Jones 2011-12-20 18:22:00 -05:00
parent 40d1402b49
commit e091c2ac6e
2 changed files with 26 additions and 0 deletions

View File

@ -812,6 +812,9 @@ Patch21047: iwlwifi-allow-to-switch-to-HT40-if-not-associated.patch
#rhbz 741117
Patch21048: b44-Use-dev_kfree_skb_irq-in-b44_tx.patch
#rhbz 746097
Patch21049: tpm_tis-delay-after-aborting-cmd.patch
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@ -1496,6 +1499,9 @@ ApplyPatch iwlwifi-allow-to-switch-to-HT40-if-not-associated.patch
#rhbz 741117
ApplyPatch b44-Use-dev_kfree_skb_irq-in-b44_tx.patch
#rhbz 746097
ApplyPatch tpm_tis-delay-after-aborting-cmd.patch
# END OF PATCH APPLICATIONS
%endif
@ -2227,6 +2233,9 @@ fi
# and build.
%changelog
* Tue Dec 20 2011 Dave Jones <davej@redhat.com>
- Delay after aborting command in tpm_tis (rhbz #746097)
* Tue Dec 20 2011 Josh Boyer <jwboyer@redhat.com>
- Backport upstream fix for b44_poll oops (rhbz #741117)
- Include crtsaves.o for ppc64 as well (rhbz #769415)

View File

@ -0,0 +1,17 @@
This patch adds a delay after aborting a command. Some TPMs need
this and will not process the subsequent command correctly otherwise.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
--- linux-3.1.noarch/drivers/char/tpm/tpm_tis.c~ 2011-12-20 18:08:01.654464487 -0500
+++ linux-3.1.noarch/drivers/char/tpm/tpm_tis.c 2011-12-20 18:08:23.476380364 -0500
@@ -432,6 +432,9 @@ static int probe_itpm(struct tpm_chip *c
out:
itpm = rem_itpm;
tpm_tis_ready(chip);
+ /* some TPMs need a break here otherwise they will not work
+ * correctly on the immediately subsequent command */
+ msleep(chip->vendor.timeout_b);
release_locality(chip, chip->vendor.locality, 0);
return rc;