Re: [RFC PATCH v4 4/8] tpm: Bound core and CRB waits by the limits table

From: Surendran Kanagaraj

Date: Tue Nov 24 2026 - 15:49:54 EST


Hi Jarkko,
Thanks for the review.

On Fri, Nov 20, 2026 at 02:22:54PM +0200, Jarkko Sakkinen wrote:
> On Wed, Nov 18, 2026 at 07:38:48AM +0000, Surendran Kanagaraj wrote:
> > Polls in tpm_try_transmit() still use fixed 1 ms sleeps and
> > tpm_transmit() stops retrying once the next backoff would pass
> > TPM2_DURATION_LONG and tpm_crb always waits TPM2_TIMEOUT_C.
> > A value set through ->adjust_limits() reaches neither the retry
> > loop nor the crb waits.
> >
> > [...]
> > ---
> > drivers/char/tpm/tpm-interface.c | 57 +++++++++++++-------------
> > drivers/char/tpm/tpm-limits.c | 19 +++++++++
> > drivers/char/tpm/tpm.h | 2 +-
> > drivers/char/tpm/tpm_crb.c | 70 +++++++++++++++++---------------
> > 4 files changed, 87 insertions(+), 61 deletions(-)
> >
> > [...]
>
> Is it possible to slice this to more intermediate steps, or not?

Yes. I will split the changes in the next rev:
- tpm_try_transmit() and tpm_transmit() changes to use the limits table
- tpm_crb driver waits to use the limits table

Thanks,
Surendran