]> git.baikalelectronics.ru Git - kernel.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)
committerRajiv Andrade <srajiv@linux.vnet.ibm.com>
Fri, 11 Feb 2011 03:30:50 +0000 (01:30 -0200)
commitbd6361ab1a5f67b527645d7b13c2efa07fef580a
treee556ea7e22297756159a1c564ed576671c419fb8
parentdb27d965bf6e6e2ef40f58665c2c3d25a4b463e8
tpm_tis: Use timeouts returned from TPM

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>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm_tis.c