Re: [PATCH 2/2] tpm/tpm_ftpm_tee: use send_recv() op
From: Jason Gunthorpe
Date: Wed Mar 26 2025 - 10:37:46 EST
On Wed, Mar 26, 2025 at 02:11:12PM +0200, Jarkko Sakkinen wrote:
> 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 ;-) ).
That is very much not the way most driver subsystems view the
world. We want to pull logical things into the core code and remove
them from drivers to make the drivers simpler and more robust.
The amount of really dumb driver boiler plate that this series
obviously removes is exactly the sort of stuff we should be fixing by
improving the core code.
The callback interface was never really sanely designed, it was just
built around the idea of pulling the timout processing into the core
code for TIS hardware. It should be revised to properly match these
new HW types that don't have this kind of timeout mechanism.
Jason