Message ID | 20210826111908.117278-4-amirmizi6@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add tpm i2c ptp driver | expand |
On Thu, 2021-08-26 at 14:19 +0300, amirmizi6@gmail.com wrote: > From: Amir Mizinski <amirmizi6@gmail.com> > > Using this function while reading/writing data resulted in an aborted > operation. "Using <the function name>...". Also what is "aborted operation"? Please say the exact thing instead of absractions. /Jarkko
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index b34e59b..4145758 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -650,13 +650,11 @@ static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status) struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); switch (priv->manufacturer_id) { - case TPM_VID_WINBOND: - return ((status == TPM_STS_VALID) || - (status == (TPM_STS_VALID | TPM_STS_COMMAND_READY))); case TPM_VID_STM: return (status == (TPM_STS_VALID | TPM_STS_COMMAND_READY)); default: - return (status == TPM_STS_COMMAND_READY); + return ((status & TPM_STS_COMMAND_READY) == + TPM_STS_COMMAND_READY); } }