kernel/tpm_tis-delay-after-aborting-cmd.patch

18 lines
692 B
Diff
Raw Normal View History

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;