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>
This commit is contained in:
Родитель
402149c647
Коммит
85ab3bf305
|
@ -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. */
|
/* Store the decision as chip->locality will be changed. */
|
||||||
need_locality = chip->locality == -1;
|
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);
|
rc = chip->ops->request_locality(chip, 0);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto out_no_locality;
|
goto out_no_locality;
|
||||||
|
|
|
@ -506,6 +506,7 @@ extern struct idr dev_nums_idr;
|
||||||
|
|
||||||
enum tpm_transmit_flags {
|
enum tpm_transmit_flags {
|
||||||
TPM_TRANSMIT_UNLOCKED = BIT(0),
|
TPM_TRANSMIT_UNLOCKED = BIT(0),
|
||||||
|
TPM_TRANSMIT_RAW = BIT(1),
|
||||||
};
|
};
|
||||||
|
|
||||||
ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
|
ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче