Re: [PATCH 2/2] tpm/tpm_ftpm_tee: use send_recv() op
From: Jarkko Sakkinen
Date: Wed Mar 26 2025 - 08:11:27 EST
On Tue, Mar 25, 2025 at 10:49:38AM +0530, Sumit Garg wrote:
> On Thu, Mar 20, 2025 at 04:24:33PM +0100, Stefano Garzarella wrote:
> > From: Stefano Garzarella <sgarzare@xxxxxxxxxx>
> >
> > This driver does not support interrupts, and receiving the response is
> > synchronous with sending the command.
> >
> > It used an internal buffer to cache the response when .send() is called,
> > and then return it when .recv() is called.
> >
> > Let's simplify the driver by implementing the new send_recv() op, so that
> > we can also remove the 4KB internal buffer used to cache the response.
> >
> > Tested-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
> > Signed-off-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>
> > ---
> > v1:
> > - added Jens' T-b
> > ---
> > drivers/char/tpm/tpm_ftpm_tee.h | 4 --
> > drivers/char/tpm/tpm_ftpm_tee.c | 86 ++++++++-------------------------
> > 2 files changed, 21 insertions(+), 69 deletions(-)
> >
>
> Reviewed-by: Sumit Garg <sumit.garg@xxxxxxxxxx>
I've knowingly even peeked at these patches because of stuff
in-flight.
Generally speaking I don't see enough value in complicating
callback interface. It's better to handle complications in
the leaves (i.e. dictatorship of majority ;-) ).
BR, Jarkko