CHROMIUM: tpm: don't run self test during probe
authorLuigi Semenzato <semenzato@chromium.org>
Mon, 21 May 2012 20:34:16 +0000 (13:34 -0700)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Jun 2012 06:55:28 +0000 (23:55 -0700)
The new version of the tpm_tis driver in kernel 3.4 runs
TPM_ContinueSelfTest in the probe function.  This is bad
in two ways.  1. If the self test has completed (which it
most likely has, since it starts automatically at power on
and lasts about 500ms) then this may start a new instance
of the selftest, and waits for it to complete, thus
delaying boot.  2. With our TPM, the command fails with
error code 0xa (BAD_ORDINAL) for unfathomable reasons.

I have sent mail to the trousers mailing list (where the
author of the TPM driver lurks) requesting some help in
understanding what goes on.  But in the meanwhile we
should apply this patch and move on.

BUG=chromium-os:31065
TEST=booted, verified that TPM works (stop tcsd, tpmc test, start tcsd)

Change-Id: I23c1f3acb3dd1b2e3149553b07fb633ac27e4aeb
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23148
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
drivers/char/tpm/tpm_tis.c

index d2a70ca..d8a3ca3 100644 (file)
@@ -584,12 +584,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
                goto out_err;
        }
 
-       if (tpm_do_selftest(chip)) {
-               dev_err(dev, "TPM self test failed\n");
-               rc = -ENODEV;
-               goto out_err;
-       }
-
        /* INTERRUPT Setup */
        init_waitqueue_head(&chip->vendor.read_queue);
        init_waitqueue_head(&chip->vendor.int_queue);