]> asedeno.scripts.mit.edu Git - linux.git/commit
tpm: only attempt to disable the LPC CLKRUN if is already enabled
authorJavier Martinez Canillas <javierm@redhat.com>
Mon, 25 Dec 2017 02:22:51 +0000 (03:22 +0100)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 8 Jan 2018 10:58:39 +0000 (12:58 +0200)
commit6c9f0ce0dffe64da2204f38b0fd90f3ae2a8903c
treed0689391178ad15e035b033c8fc2ef0278e07749
parent5fc0bead786d76f5edc732f60451e3fca310f7a0
tpm: only attempt to disable the LPC CLKRUN if is already enabled

Commit 5e572cab92f0 ("tpm: Enable CLKRUN protocol for Braswell systems")
added logic in the TPM TIS driver to disable the Low Pin Count CLKRUN
signal during TPM transactions.

Unfortunately this breaks other devices that are attached to the LPC bus
like for example PS/2 mouse and keyboards.

One flaw with the logic is that it assumes that the CLKRUN is always
enabled, and so it unconditionally enables it after a TPM transaction.

But it could be that the CLKRUN# signal was already disabled in the LPC
bus and so after the driver probes, CLKRUN_EN will remain enabled which
may break other devices that are attached to the LPC bus but don't have
support for the CLKRUN protocol.

Fixes: 5e572cab92f0 ("tpm: Enable CLKRUN protocol for Braswell systems")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: James Ettle <james@ettle.org.uk>
Tested-by: Jeffery Miller <jmiller@neverware.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_tis_core.c