diff options
author | Eddie James <eajames@linux.ibm.com> | 2022-11-07 20:14:23 +0300 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2022-12-08 19:20:47 +0300 |
commit | 7bfda9c73fa9710a842a7d6f89b024351c80c19c (patch) | |
tree | cfe9a3aba5a4d5fb5496111c5d75fcd14666f19f /drivers/char/tpm/tpm_tis_i2c.c | |
parent | 561d6ef75628db9cce433e573aa3cdb6b3bba903 (diff) | |
download | linux-7bfda9c73fa9710a842a7d6f89b024351c80c19c.tar.xz |
tpm: Add flag to use default cancellation policy
The check for cancelled request depends on the VID of the chip, but
some chips share VID which shouldn't share their cancellation
behavior. This is the case for the Nuvoton NPCT75X, which should use
the default cancellation check, not the Winbond one.
To avoid changing the existing behavior, add a new flag to indicate
that the chip should use the default cancellation check and set it
for the I2C TPM2 TIS driver.
Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core")
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Tested-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char/tpm/tpm_tis_i2c.c')
-rw-r--r-- | drivers/char/tpm/tpm_tis_i2c.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c index 635a69dfcbbd..f3a7251c8e38 100644 --- a/drivers/char/tpm/tpm_tis_i2c.c +++ b/drivers/char/tpm/tpm_tis_i2c.c @@ -329,6 +329,7 @@ static int tpm_tis_i2c_probe(struct i2c_client *dev, if (!phy->io_buf) return -ENOMEM; + set_bit(TPM_TIS_DEFAULT_CANCELLATION, &phy->priv.flags); phy->i2c_client = dev; /* must precede all communication with the tpm */ |