lkml.org 
[lkml]   [2020]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 3/8] tpm: tpm_tis: Add retry in case of protocol failure or data integrity (on I2C only) failure.
On Thu, Jun 04, 2020 at 04:47:08PM +0300, amirmizi6@gmail.com wrote:
> From: Amir Mizinski <amirmizi6@gmail.com>
>
> The FIFO protocol described in the TCG PC Client Device Driver Design
> Principles for TPM 2.0 advises retrying sending a command or receiving
> a response using the FIFO protocol in case of any error in the protocol.
>
> Add a retry mechanism on any protocol error. In addition, in case of a data
> integrity issue in the I2C bus protocol, check after sending a command
> completion or receiving a response from the TPM.

The first sentence of this paragraph means absolutely nothing but
nonsense. Please describe the implementation broadly instead.

Also the code is organized badly and makes the current code base a mess.
You should derive __tpm_tis_recv() from the "old" tpm_tis_recv(), and
introduce a "new" tpm_tis_recv() that calls __tpm_tis_recv() a number of
times.

/Jarkko

\
 
 \ /
  Last update: 2020-06-17 03:20    [W:0.071 / U:1.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site