linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Does probing of TIS with interrupts work
@ 2019-08-13  3:39 Stefan Berger
  2019-08-13 12:28 ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Berger @ 2019-08-13  3:39 UTC (permalink / raw)
  To: linux-integrity, Jarkko Sakkinen; +Cc: Marc-André Lureau

I have tried to get probing of TIS with interrupts to work on a module 
and I am wondering whether it works for anyone. I noticed it tries to 
probe while locality 0 is released and the TPM_CHIP_FLAG_IRQ is never 
set, so it never gets to certain places in the code. To get it to work I 
had to add a patch like this one here to tpm_tis_core_init:

@ -981,11 +1023,16 @@ int tpm_tis_core_init(struct device *dev, struct 
tpm_tis_data *priv, int irq,
                 }

                 if (irq) {
+                       tpm_chip_start(chip);
+                       printk(KERN_INFO "%s %d: chip->flags & 
TPM_CHIP_FLAG_IRQ = %x\n",
+                            __func__, __LINE__, chip->flags & 
TPM_CHIP_FLAG_IRQ);
+                       chip->flags |= TPM_CHIP_FLAG_IRQ;
                         tpm_tis_probe_irq_single(chip, intmask, 
IRQF_SHARED,
                                                  irq);
                         if (!(chip->flags & TPM_CHIP_FLAG_IRQ))
                                 dev_err(&chip->dev, FW_BUG
                                         "TPM interrupt not working, 
polling instead\n");
+                       tpm_chip_stop(chip);
                 } else {
                         tpm_tis_probe_irq(chip, intmask);
                 }


Can this be right ?

    Stefan


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

end of thread, other threads:[~2019-08-20 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13  3:39 Does probing of TIS with interrupts work Stefan Berger
2019-08-13 12:28 ` Jason Gunthorpe
2019-08-15 21:17   ` Jarkko Sakkinen
2019-08-20 10:41     ` Stefan Berger

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