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)
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

Simple merge
Simple merge
Simple merge