Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352863
b: refs/heads/master
c: 4643826
h: refs/heads/master
i:
  352861: 7821af2
  352859: 909b4f6
  352855: 845cd24
  352847: e9ffb29
  352831: 1e7a4cd
v: v3
  • Loading branch information
Jason Gunthorpe authored and Kent Yoder committed Feb 5, 2013
1 parent 67b2fd2 commit 2c31b4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fbc5e95356a4600fab3a04a82dc8bb49591aedd
refs/heads/master: 4643826a3da17767494b85c956c73c138c96a7ea
10 changes: 9 additions & 1 deletion trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ int tpm_do_selftest(struct tpm_chip *chip)
{
int rc;
unsigned int loops;
unsigned int delay_msec = 1000;
unsigned int delay_msec = 100;
unsigned long duration;
struct tpm_cmd_t cmd;

Expand All @@ -864,6 +864,14 @@ int tpm_do_selftest(struct tpm_chip *chip)
cmd.header.in = pcrread_header;
cmd.params.pcrread_in.pcr_idx = cpu_to_be32(0);
rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE);
/* Some buggy TPMs will not respond to tpm_tis_ready() for
* around 300ms while the self test is ongoing, keep trying
* until the self test duration expires. */
if (rc == -ETIME) {
dev_info(chip->dev, HW_ERR "TPM command timed out during continue self test");
msleep(delay_msec);
continue;
}

if (rc < TPM_HEADER_SIZE)
return -EFAULT;
Expand Down

0 comments on commit 2c31b4d

Please sign in to comment.