CHROMIUM: tpm: always run ContinueSelftest at resume

In a previous patch we moved ContinueSelfTest out of the resume path
to speed it up, and we skip the command if enough time has passed
between the resume and the first following TPM command, on the
assumption that the TPM starts and runs the self test to completion
at resume time.  (This applies only to TPMs that are powered off
between suspend and resume.)

The ST Micro TPM behaves differently and needs ContinueSelfTest
to be called at resume, before the next TPM command can be
successfully executed.  We could make the behavior of the
resume callback depend on the TPM model.  However, ContinueSelftest
completes quickly on all TPM models currently used in Chromebooks,
and it's not on any critical path.  So we prefer to make the
code simpler for everybody.

BUG=chrome-os-partner:15694
TEST=tested manually

Change-Id: I62e12db3506947e757ea251a9f8915ffae6ac106
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37468
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
2 files changed