linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm_tis: Verify ACPI-specified interrupt
@ 2014-08-22  0:58 Scot Doyle
  2014-08-22 16:06 ` Jason Gunthorpe
  0 siblings, 1 reply; 35+ messages in thread
From: Scot Doyle @ 2014-08-22  0:58 UTC (permalink / raw)
  To: Peter Huewe, Ashley Lai, Marcel Selhorst
  Cc: Jason Gunthorpe, Stefan Berger, tpmdd-devel, linux-kernel

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@scotdoyle.com>
Tested-by: James Duley <jagduley@gmail.com>
Tested-by: Michael Mullin <masmullin@gmail.com>
---
  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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2014-11-30 14:19 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22  0:58 [PATCH] tpm_tis: Verify ACPI-specified interrupt Scot Doyle
2014-08-22 16:06 ` Jason Gunthorpe
2014-08-22 20:17   ` Scot Doyle
2014-08-22 20:32     ` Jason Gunthorpe
2014-08-22 22:48       ` Peter Hüwe
2014-08-25  6:38       ` Scot Doyle
2014-08-25 18:24         ` Jason Gunthorpe
2014-08-27  4:31           ` [RFC PATCH v2] tpm_tis: verify interrupt during init Scot Doyle
2014-08-27 17:31             ` Jason Gunthorpe
2014-08-27 21:32               ` [RFC PATCH v3] " Scot Doyle
2014-08-27 21:47                 ` Jason Gunthorpe
2014-08-28  0:35                   ` Scot Doyle
2014-08-28 16:53                     ` Jason Gunthorpe
2014-08-29 23:59                       ` [RFC PATCH v4] " Scot Doyle
2014-08-30 17:49                         ` Jason Gunthorpe
2014-08-30 23:23                           ` [RFC PATCH v5] " Scot Doyle
2014-09-02 17:20                             ` Jason Gunthorpe
2014-09-02 20:22                               ` [RFC PATCH v6] " Scot Doyle
2014-09-08 22:02                                 ` Jason Gunthorpe
2014-09-09  2:13                                   ` [PATCH v7] " Scot Doyle
2014-09-09  3:12                                     ` Scot Doyle
2014-09-11  0:50                                   ` [RFC PATCH v8] " Scot Doyle
2014-09-16 23:36                                     ` Scot Doyle
2014-09-22 17:13                                     ` Jason Gunthorpe
2014-09-22 19:01                                       ` Peter Hüwe
2014-10-19 20:08                                         ` Scot Doyle
2014-09-23  2:44                                       ` Scot Doyle
2014-09-23  2:51                                         ` [PATCH v9] " Scot Doyle
2014-09-23 11:55                                           ` Scot Doyle
2014-09-23 17:12                                             ` [tpmdd-devel] " Stefan Berger
2014-09-24 19:38                                               ` Scot Doyle
2014-09-24 19:41                                                 ` Stefan Berger
2014-09-24 22:41                                                   ` [PATCH v10] " Scot Doyle
2014-09-29 17:24                                                     ` Jason Gunthorpe
2014-11-30 14:24                                                       ` Peter Hüwe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).