summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2025-06-20 15:08:08 +0200
committerJarkko Sakkinen <jarkko@kernel.org>2025-07-23 02:23:18 +0300
commit04fe47015d7726b42c34615c124697c7a3537bf0 (patch)
tree4bc35429810346caaa32cdcae8d0b4d3c5c5af21 /scripts/lib
parent07d8004d6fb95cbe48918e56012f16454cfdfe89 (diff)
tpm: support devices with synchronous send()
Some devices do not support interrupts and provide a single synchronous operation to send the command and receive the response on the same buffer. Currently, these types of drivers must use an internal buffer where they temporarily store the response between .send() and .recv() calls. Introduce a new flag (TPM_CHIP_FLAG_SYNC) to support synchronous send(). If that flag is set by the driver, tpm_try_transmit() will use the send() callback to send the command and receive the response on the same buffer synchronously. In that case send() return the number of bytes of the response on success, or -errno on failure. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Suggested-by: Jason Gunthorpe <jgg@ziepe.ca> Suggested-by: Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions