On 08.02.2019 20:00, Jarkko Sakkinen wrote:
On Fri, Feb 08, 2019 at 01:12:34PM -0500, Stefan Berger wrote:
On 2/8/19 1:08 PM, Jarkko Sakkinen wrote:
The send() callback should never return length as it does not in every
driver except tpm_crb in the success case. The reason is that the main
transmit functionality only cares about whether the transmit was
successful or not and ignores the count completely.
Cc: sta...@vger.kernel.org
Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com>
Reviewed-by: Stefan Berger <stef...@linux.ibm.com>
Let me know when you put it into your tree, I'll give it a spin while I am
at it. :-)
Thank you Stefan! I also add your suggested-by to the first commit
because you pointed out the problem.
It all looks now legit, but just in case I'll add a check for the return
value to tpm_try_transmit() and a warning if it is not zero in the
success case (and after that zeroing of rc).
That check can be removed when I do v5.3 pull request. That should
enough window to catch any potential issues and check will ensure that
kernel won't fail even there was something forgotten.
Alexander, I'll push this version now to the master and next with the
additional check described in this commit, but will add your tags
after you have time to test.
I ran all tests again and everything works now as expected :)
Tested-by: Alexander Steffen <alexander.stef...@infineon.com>
Alexander