aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm-interface.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2017-05-24 17:39:39 -0400
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2017-06-13 22:02:09 +0300
commit85ab3bf305b96e5f4c83b23a0b7e11d90144eb18 (patch)
treef5cf55bfe1773613f11aa3dabdba5beb334f01ca /drivers/char/tpm/tpm-interface.c
parenttpm: vtpm_proxy: Suppress error logging when in closed state (diff)
downloadlinux-dev-85ab3bf305b96e5f4c83b23a0b7e11d90144eb18.tar.xz
linux-dev-85ab3bf305b96e5f4c83b23a0b7e11d90144eb18.zip
tpm: Introduce flag TPM_TRANSMIT_RAW
Introduce the flag TPM_TRANSMIT_RAW that allows us to transmit a command without recursing into the requesting of locality. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char/tpm/tpm-interface.c')
-rw-r--r--drivers/char/tpm/tpm-interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index a965a9f0e5d2..8ef5e1723efb 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -416,7 +416,8 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
/* Store the decision as chip->locality will be changed. */
need_locality = chip->locality == -1;
- if (need_locality && chip->ops->request_locality) {
+ if (!(flags & TPM_TRANSMIT_RAW) &&
+ need_locality && chip->ops->request_locality) {
rc = chip->ops->request_locality(chip, 0);
if (rc < 0)
goto out_no_locality;