tpm, tpm_tis: fix TPM 2.0 probing
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 4 Feb 2015 14:21:09 +0000 (16:21 +0200)
committerPeter Huewe <peterhuewe@gmx.de>
Sun, 15 Feb 2015 15:59:15 +0000 (16:59 +0100)
commit4d5f2051cd24adc19a645e920344e05afe8d69b9
treec6397680572adf9968f4839e290bf2e048596e01
parent74d6b3ceaa17d111220c3f09f50f901bf955d7c8
tpm, tpm_tis: fix TPM 2.0 probing

If during transmission system error was returned, the logic was to
incorrectly deduce that chip is a TPM 1.x chip. This patch fixes this
issue. Also, this patch changes probing so that message tag is used as the
measure for TPM 2.x, which should be much more stable. A separate function
called tpm2_probe() is encapsulated because it can be used with any
chipset.

Fixes: aec04cbdf723 ("tpm: TPM 2.0 FIFO Interface")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm2-cmd.c
drivers/char/tpm/tpm_tis.c