Re: [PATCH v4 2/2] tpm: add support for partial reads

From: Tadeusz Struk
Date: Mon Nov 19 2018 - 12:43:04 EST


On 11/19/18 9:28 AM, Jarkko Sakkinen wrote:
> Ah, you are correct.
>
> You should add a boolean flag instead of introducing a new variable for
> holding amount that has been read because obviously one read operation
> is enough for backwards compatibility.
>
> The code could read the code to data_pending and then set
>
> priv->data_read = false;
>
> We do not need the original amount for anything.

but we still need to keep track of how much of the response is left unconsumed.

--
Tadeusz