On Fri Dec 06 19, Jarkko Sakkinen wrote:
On Fri, Nov 29, 2019 at 05:12:53PM -0700, Jerry Snitselaar wrote:
On Sat Nov 30 19, Jarkko Sakkinen wrote:
On Wed, Nov 27, 2019 at 06:20:55PM -0700, Jerry Snitselaar wrote:
There also was that other issue reported on the list about tpm_tis_core_init failing when calling tpm_get_timeouts due to the power gating changes.
Please add a (lore.ko) link for reference to this thread.
/Jarkko
https://lore.kernel.org/linux-integrity/a60dadce-3650-44ce-8785-2f737ab9b993...
tpm_chip_stop() probably causes the issue. That is why tpm2_probe() works and failure happens after that.
tpm_chip_stop() should be called once at the end of the function.
The patch I posted that fixed the issue for him moved the tpm_chip_start() from the irq probing section right below there to before the tpm_get_timeouts call, but your idea is better.
Any thoughts on the irq issue? I need to go back and look at the older commits again, but before Stefan's patch enabling the irq flag I'm not sure the last time that testing code section in tpm_tis_send was actually used. I think prior to that it always just went straight to tpm_tis_send_main.
570a36097f30 ("tpm: drop 'irq' from struct tpm_vendor_specific") adds the flag, and I can see where it disables and enables the flag in the testing code in tpm_tis_send, but I don't see where it enables the flag originally for it to ever get into the testing section of tpm_tis_send. That means since this commit tpm_tis hasn't been using interrupts, right?
Regards, Jerry
/Jarkko