Re: [PATCH v2 3/4] tpm: Implement command and response retry in tpm_tis_core

From: Jarkko Sakkinen
Date: Sat May 07 2022 - 15:55:24 EST


On Fri, May 06, 2022 at 07:00:15PM +0200, Johannes Holland wrote:
> Some errors during command transmission and response reception are
> recoverable. Implement the specified retry mechanisms.
>
> Recoverable errors during response reception:
> * invalid response size during header read
> * left over data:
> a communication error can lead to a FIFO read of 0xFFs and an
> unexpected STS.dataAvail = 1, subsequently
> * CRC mismatch
>
> Recoverable errors during transmit:
> * CRC mismatch
>
> Signed-off-by: Johannes Holland <johannes.holland@xxxxxxxxxxxx>

You should split this multiple patch, each implementing one retry
mechanism (CRC's can for recv and transmit can be in a single path
tho):

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#separate-your-changes

BR, Jarkko