TPM: Long default timeout fix
commit5718043736912b35b06b55a261c294a1e467b6e8
authorRajiv Andrade <srajiv@linux.vnet.ibm.com>
Fri, 12 Nov 2010 21:30:02 +0000 (12 22:30 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:37:11 +0000 (17 15:37 -0800)
tree1fff9805358efd871ddb22e6e1eddd0b8bb79d89
parentc873af89555d5012ad0568c695e31ade2a5b17e5
TPM: Long default timeout fix

commit c4ff4b829ef9e6353c0b133b7adb564a68054979 upstream.

If duration variable value is 0 at this point, it's because
chip->vendor.duration wasn't filled by tpm_get_timeouts() yet.
This patch sets then the lowest timeout just to give enough
time for tpm_get_timeouts() to further succeed.

This fix avoids long boot times in case another entity attempts
to send commands to the TPM when the TPM isn't accessible.

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tpm/tpm.c