[PATCH v4 3/6] tpm, tpm_tis: enable irq test

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

 



From: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>

The test for working irqs which is done in tpm_tis_send() is only executed
if both priv->irq_tested is false and TPM_CHIP_FLAG_IRQ is set in
chip->flags.

While the first condition is initially met, the TPM_CHIP_FLAG_IRQ flag is
never set, which prevents the irq test from being ever executed. Fix this
by setting TPM_CHIP_FLAG_IRQ just before the test is made.

Signed-off-by: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
---
 drivers/char/tpm/tpm_tis_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 46f504fb5084..4f3b82c3f205 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -781,6 +781,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
 		return rc;
 
 	priv->irq_tested = false;
+	chip->flags |= TPM_CHIP_FLAG_IRQ;
 
 	/* Generate an interrupt by having the core call through to
 	 * tpm_tis_send
-- 
2.36.0


[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