Re: [PATCH] tpm: sleep at least <...> ms in tpm_msleep()

From: James Bottomley
Date: Wed May 11 2022 - 16:12:55 EST


On Tue, 2022-05-10 at 13:29 +0200, Johannes Holland wrote:
> To comply with protocol requirements, minimum polling times must
> often be adhered to. Therefore, a macro like tpm_msleep() should
> sleep at least the given amount of time (not up to the given period).
> Have tpm_msleep() sleep at least the given number of milliseconds.
>
> Signed-off-by: Johannes Holland <johannes.holland@xxxxxxxxxxxx>

This seems to fix the problem I reported years ago with my Nuvoton
laptop TPM.

https://lore.kernel.org/linux-integrity/1531328689.3260.8.camel@xxxxxxxxxxxxxxxxxxxxx/

It probably needs to soak a bit longer to declare victory (this timeout
failure is very intermittent), but it looks hopeful.

Regards,

James