Does probing of TIS with interrupts work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux