Skip to contentSkip to conversation

tpm: Revert "tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts"

PATCH New Jerry Snitselaar 1 participant 2 messages Jan 9, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/2 tpm: Revert "tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts"

Bugzilla: 1789088
Upstream Status: dda8b2af395b2ed508e2ef314ae32e122841b447
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25656672

commit dda8b2af395b2ed508e2ef314ae32e122841b447

Author: Stefan Berger <[email protected]>
Date:   Tue Nov 26 08:17:52 2019 -0500

tpm: Revert "tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts"

There has been a bunch of reports (one from kernel bugzilla linked) reporting that when this commit is applied it causes on some machines boot freezes.

Unfortunately hardware where this commit causes a failure is not widely available (only one I'm aware is Lenovo T490), which means we cannot predict yet how long it will take to properly fix tpm_tis interrupt probing.

Thus, the least worst short term action is to revert the code to the state before this commit. In long term we need fix the tpm_tis probing code to work on machines that Stefan's fix was supposed to fix.

Fixes 1ea32c83c699 ("tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts")
Cc Jerry Snitselaar <[email protected]>
Cc Dan Williams <[email protected]>
(cherry picked from commit dda8b2af395b2ed508e2ef314ae32e122841b447)
---
 drivers/char/tpm/tpm_tis_core.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/tpm/tpm_tis_core.c +0 -1
index 270f43acbb77..ffa9048d8f6c 100644
@@ -981,7 +981,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 		}
 
 		tpm_chip_start(chip);
-		chip->flags |= TPM_CHIP_FLAG_IRQ;
 		if (irq) {
 			tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
 						 irq);
Signature · 1 line
2.24.0
#2 lore raw

PATCH 2/2 tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's"

In reply to a message not in the archive

Bugzilla: 1789088
Upstream Status: aa4a63dd981682b1742baa01237036e48bc11923
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25656672

commit aa4a63dd981682b1742baa01237036e48bc11923

Author: Stefan Berger <[email protected]>
Date:   Tue Nov 26 08:17:53 2019 -0500

tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's"

There has been a bunch of reports (one from kernel bugzilla linked) reporting that when this commit is applied it causes on some machines boot freezes.

Unfortunately hardware where this commit causes a failure is not widely available (only one I'm aware is Lenovo T490), which means we cannot predict yet how long it will take to properly fix tpm_tis interrupt probing.

Thus, the least worst short term action is to revert the code to the state before this commit. In long term we need fix the tpm_tis probing code to work on machines that Stefan's fix was supposed to fix.

Fixes 21df4a8b6018 ("tpm_tis: reserve chip for duration of tpm_tis_core_init")
Cc Jerry Snitselaar <[email protected]>
Cc Dan Williams <[email protected]>
(cherry picked from commit aa4a63dd981682b1742baa01237036e48bc11923)
---
 drivers/char/tpm/tpm_tis_core.c | 2 --
 1 file changed, 2 deletions(-)
drivers/char/tpm/tpm_tis_core.c +0 -2
index ffa9048d8f6c..c3181ea9f271 100644
@@ -980,7 +980,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 			goto out_err;
 		}
 
-		tpm_chip_start(chip);
 		if (irq) {
 			tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
 						 irq);
@@ -990,7 +989,6 @@ 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);
Signature · 1 line
2.24.0