|
@@ -1002,6 +1002,10 @@ int tpm_do_selftest(struct tpm_chip *chip)
|
|
loops = jiffies_to_msecs(duration) / delay_msec;
|
|
loops = jiffies_to_msecs(duration) / delay_msec;
|
|
|
|
|
|
rc = tpm_continue_selftest(chip);
|
|
rc = tpm_continue_selftest(chip);
|
|
|
|
+ if (rc == TPM_ERR_INVALID_POSTINIT) {
|
|
|
|
+ chip->flags |= TPM_CHIP_FLAG_ALWAYS_POWERED;
|
|
|
|
+ dev_info(&chip->dev, "TPM not ready (%d)\n", rc);
|
|
|
|
+ }
|
|
/* This may fail if there was no TPM driver during a suspend/resume
|
|
/* This may fail if there was no TPM driver during a suspend/resume
|
|
* cycle; some may return 10 (BAD_ORDINAL), others 28 (FAILEDSELFTEST)
|
|
* cycle; some may return 10 (BAD_ORDINAL), others 28 (FAILEDSELFTEST)
|
|
*/
|
|
*/
|