Skip to content

Commit 2c6b180

Browse files
stefanbergergregkh
authored andcommitted
tpm_tis: add delay after aborting command
commit a927b81 upstream. This patch adds a delay after aborting a command. Some TPMs need this and will not process the subsequent command correctly otherwise. It's worth noting that a TPM randomly failing to process a command, maps to randomly failing suspend/resume operations. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 64d4ed6 commit 2c6b180

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/char/tpm/tpm_tis.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ static int probe_itpm(struct tpm_chip *chip)
432432
out:
433433
itpm = rem_itpm;
434434
tpm_tis_ready(chip);
435+
/* some TPMs need a break here otherwise they will not work
436+
* correctly on the immediately subsequent command */
437+
msleep(chip->vendor.timeout_b);
435438
release_locality(chip, chip->vendor.locality, 0);
436439

437440
return rc;

0 commit comments

Comments
 (0)