[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220509080559.4381-4-LinoSanfilippo@gmx.de>
Date: Mon, 9 May 2022 10:05:56 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: peterhuewe@....de, jarkko@...nel.org, jgg@...pe.ca
Cc: stefanb@...ux.vnet.ibm.com, linux@...ewoehner.de,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
LinoSanfilippo@....de, lukas@...ner.de, p.rosenberger@...bus.com,
Lino Sanfilippo <l.sanfilippo@...bus.com>
Subject: [PATCH v4 3/6] tpm, tpm_tis: enable irq test
From: Lino Sanfilippo <l.sanfilippo@...bus.com>
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@...bus.com>
---
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
Powered by blists - more mailing lists