tpm_tis_spi: Check correct byte for wait state indicator
authorPeter Huewe <peter.huewe@infineon.com>
Thu, 2 Mar 2017 13:03:13 +0000 (13:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:31 +0000 (15:44 +0200)
commitd513cf24e240f8c7a9127b566b915ce9730fd23e
tree5cb421952d9a1c5c2d7dbe45ec1d291f89609eb4
parentdaa432c1a65a541b413111328f8aea61161ad372
tpm_tis_spi: Check correct byte for wait state indicator

commit e110cc69dc2ad679d6d478df636b99b14e6fbbc9 upstream.

Wait states are signaled in the last byte received from the TPM in
response to the header, not the first byte. Check rx_buf[3] instead of
rx_buf[0].

Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy")
Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Benoit Houyere <benoit.houyere@st.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_tis_spi.c