Hi Qunqin,

The automated review raised a coupling concern: if TPM_BUFSIZE is ever
raised above the hardware's per-engine window size (currently 4096 for
dmam_size = 64 KiB / 16), the probe check would reject working hardware.

Two possible directions:

A) Keep the probe-time rejection as-is (v3).  Simple, and correct as
   long as buffer_size >= TPM_BUFSIZE holds on all supported platforms.

B) Move the buffer_size bound to recv-time instead, so the driver
   adapts to whatever window the firmware provides without coupling
   to TPM_BUFSIZE:

     if (data_len > tpm_engine->buffer_size)
         return -EIO;

   Probe stays unconditional.

Do you have a preference?  Happy to send v4 either way.

Reply via email to