linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm_tis: Fix interrupt probing
@ 2019-08-20 12:25 Stefan Berger
  2019-08-21 19:15 ` Jarkko Sakkinen
  2019-08-27 13:14 ` Jarkko Sakkinen
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Berger @ 2019-08-20 12:25 UTC (permalink / raw)
  To: jarkko.sakkinen, linux-integrity
  Cc: linux-security-module, linux-kernel, Stefan Berger

From: Stefan Berger <stefanb@linux.ibm.com>

The interrupt probing of the TPM TIS was broken since we are trying to
run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 drivers/char/tpm/tpm_tis_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index c3181ea9f271..270f43acbb77 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -980,6 +980,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 			goto out_err;
 		}
 
+		tpm_chip_start(chip);
+		chip->flags |= TPM_CHIP_FLAG_IRQ;
 		if (irq) {
 			tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
 						 irq);
@@ -989,6 +991,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 		} else {
 			tpm_tis_probe_irq(chip, intmask);
 		}
+		tpm_chip_stop(chip);
 	}
 
 	rc = tpm_chip_register(chip);
-- 
2.14.5


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

end of thread, other threads:[~2019-08-30 17:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 12:25 [PATCH] tpm_tis: Fix interrupt probing Stefan Berger
2019-08-21 19:15 ` Jarkko Sakkinen
2019-08-27 13:14 ` Jarkko Sakkinen
2019-08-27 15:19   ` Jarkko Sakkinen
2019-08-27 19:34     ` Stefan Berger
2019-08-29 13:20       ` Jarkko Sakkinen
2019-08-29 16:10         ` Jarkko Sakkinen
2019-08-30  0:11           ` Stefan Berger
2019-08-30 17:00             ` Jarkko Sakkinen

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).