tpm: Apply a sane minimum adapterlimit value for retransmission.
authorBryan Freed <bfreed@chromium.org>
Mon, 22 May 2017 09:20:11 +0000 (11:20 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 13 Jun 2017 19:02:08 +0000 (22:02 +0300)
commitd8c3eab5cb92f37ca8576fc641fa4bfd8a0c8b00
tree18c9216bda1e1697579ef111f68c5bad8f008316
parent4cb586a188d468e05649575f0689dd2bf8c122e6
tpm: Apply a sane minimum adapterlimit value for retransmission.

When the I2C Infineon part is attached to an I2C adapter that imposes
a size limitation, large requests will fail with -EOPNOTSUPP. Retry
them with a sane minimum size without re-issuing the 0x05 command
as this appears to occasionally put the TPM in a bad state.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
[rework the patch to adapt to the feedback received]
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_i2c_infineon.c