Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169164
b: refs/heads/master
c: 3507d61
h: refs/heads/master
v: v3
  • Loading branch information
Rajiv Andrade authored and James Morris committed Nov 1, 2009
1 parent 9f28bc5 commit 62f9e58
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: 5975c725dfd6f7d36f493ab1453fbdbd35c1f0e3
refs/heads/master: 3507d612366a4e81226295f646410130a1f62a5c
10 changes: 9 additions & 1 deletion trunk/drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count)
return size;
}

static int itpm;
module_param(itpm, bool, 0444);
MODULE_PARM_DESC(itpm, "Force iTPM workarounds (found on some Lenovo laptops)");

/*
* If interrupts are used (signaled by an irq set in the vendor structure)
* tpm.c can skip polling for the data to be available as the interrupt is
Expand Down Expand Up @@ -293,7 +297,7 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
wait_for_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c,
&chip->vendor.int_queue);
status = tpm_tis_status(chip);
if ((status & TPM_STS_DATA_EXPECT) == 0) {
if (!itpm && (status & TPM_STS_DATA_EXPECT) == 0) {
rc = -EIO;
goto out_err;
}
Expand Down Expand Up @@ -467,6 +471,10 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
"1.2 TPM (device-id 0x%X, rev-id %d)\n",
vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0)));

if (itpm)
dev_info(dev, "Intel iTPM workaround enabled\n");


/* Figure out the capabilities */
intfcaps =
ioread32(chip->vendor.iobase +
Expand Down

0 comments on commit 62f9e58

Please sign in to comment.