Message ID | 20220629232653.1306735-11-LinoSanfilippo@gmx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | TPM IRQ fixes | expand |
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 307a7a3a55c6..e0889c152909 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -782,11 +782,16 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip) if (ret < 0) return ret; + chip->flags |= TPM_CHIP_FLAG_IRQ; + if (chip->flags & TPM_CHIP_FLAG_TPM2) ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc); else ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0); + if (ret) + chip->flags &= ~TPM_CHIP_FLAG_IRQ; + tpm_tis_release_locality(chip, 0); return ret;