tpm_tis: use default timeout value if chip reports it as zero
Since commit1107d065fd
("tpm_tis: Introduce intermediate layer for TPM access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no longer works. The initialization proceeds fine until we get and start using chip-reported timeouts - and the chip reports C and D timeouts of zero. It turns out that until commit8e54caf407
("tpm: Provide a generic means to override the chip returned timeouts") we had actually let default timeout values remain in this case, so let's bring back this behavior to make chips like Atmel 3203 work again. Use a common code that was introduced by that commit so a warning is printed in this case and /sys/class/tpm/tpm*/timeouts correctly says the timeouts aren't chip-original. Fixes:1107d065fd
("tpm_tis: Introduce intermediate layer for TPM access") Cc: stable@vger.kernel.org Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
This commit is contained in:

committed by
Jarkko Sakkinen

parent
62bfdacbac
commit
1d70fe9d9c
@@ -159,7 +159,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info,
|
||||
irq = tpm_info->irq;
|
||||
|
||||
if (itpm)
|
||||
phy->priv.flags |= TPM_TIS_ITPM_POSSIBLE;
|
||||
phy->priv.flags |= TPM_TIS_ITPM_WORKAROUND;
|
||||
|
||||
return tpm_tis_core_init(dev, &phy->priv, irq, &tpm_tcg,
|
||||
acpi_dev_handle);
|
||||
|
Reference in New Issue
Block a user