[PATCH] tpm_tis: Verify ACPI-specified interrupt
From: Scot Doyle
Date: Thu Aug 21 2014 - 21:01:57 EST
Some machines, such as the Acer C720 and Toshiba CB35, have TPMs
that do not use interrupts while also having an ACPI TPM entry
indicating a specific interrupt to be used. Since this interrupt
is invalid, these machines freeze on resume until the interrupt
times out.
Generate the ACPI-specified interrupt. If none is received, then
fall back to polling mode.
Signed-off-by: Scot Doyle <lkml14@xxxxxxxxxxxxx>
Tested-by: James Duley <jagduley@xxxxxxxxx>
Tested-by: Michael Mullin <masmullin@xxxxxxxxx>
---
drivers/char/tpm/tpm_tis.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 2c46734..736ed4a 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -633,12 +633,14 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
iowrite32(intmask,
chip->vendor.iobase +
TPM_INT_ENABLE(chip->vendor.locality));
- if (interrupts)
- chip->vendor.irq = irq;
- if (interrupts && !chip->vendor.irq) {
- irq_s =
- ioread8(chip->vendor.iobase +
- TPM_INT_VECTOR(chip->vendor.locality));
+ chip->vendor.irq = 0;
+ if (interrupts) {
+ if (irq)
+ irq_s = irq;
+ else
+ irq_s =
+ ioread8(chip->vendor.iobase +
+ TPM_INT_VECTOR(chip->vendor.locality));
if (irq_s) {
irq_e = irq_s;
} else {
--
2.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/