diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2011-11-11 12:57:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-03 09:21:35 -0800 |
commit | 2c6b180537f35fc90b94416b09aca07ced98391c (patch) | |
tree | 2fe76470160863b1065439df0e5166c3254c0eb8 /drivers/char | |
parent | 64d4ed6a2f0eae34c50497775c14c2445deb9748 (diff) |
tpm_tis: add delay after aborting command
commit a927b8131794ee449b7f6666e7ab61301949b20f 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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 3f4051a7c5a..c7e5282fb88 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -432,6 +432,9 @@ static int probe_itpm(struct tpm_chip *chip) 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; |