]> rtime.felk.cvut.cz Git - linux-imx.git/commit
tpm_tis: Use timeouts returned from TPM
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Tue, 11 Jan 2011 19:37:29 +0000 (14:37 -0500)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:57:54 +0000 (11:57 -0700)
commit5373abb7b877203095f9bd806d9f8040998fccb5
treea4aa68513f426269b4e18f9bf85f13c715340710
parentfdd7c779cc992bd5d0930e381b8023907cb750f0
tpm_tis: Use timeouts returned from TPM

commit 9b29050f8f75916f974a2d231ae5d3cd59792296 upstream.

The current TPM TIS driver in git discards the timeout values returned
from the TPM. The check of the response packet needs to consider that
the return_code field is 0 on success and the size of the expected
packet is equivalent to the header size + u32 length indicator for the
TPM_GetCapability() result + 3 timeout indicators of type u32.

I am also adding a sysfs entry 'timeouts' showing the timeouts that are
being used.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm_tis.c