aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_tis.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tpm/tpm_tis.c')
-rw-r--r--drivers/char/tpm/tpm_tis.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index e4e0c65df768..ae91c115c438 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -198,7 +198,7 @@ static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count)
198 wait_for_tpm_stat(chip, 198 wait_for_tpm_stat(chip,
199 TPM_STS_DATA_AVAIL | TPM_STS_VALID, 199 TPM_STS_DATA_AVAIL | TPM_STS_VALID,
200 chip->vendor.timeout_c, 200 chip->vendor.timeout_c,
201 &chip->vendor.read_queue) 201 &chip->vendor.read_queue, true)
202 == 0) { 202 == 0) {
203 burstcnt = get_burstcount(chip); 203 burstcnt = get_burstcount(chip);
204 for (; burstcnt > 0 && size < count; burstcnt--) 204 for (; burstcnt > 0 && size < count; burstcnt--)
@@ -241,7 +241,7 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count)
241 } 241 }
242 242
243 wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, 243 wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c,
244 &chip->vendor.int_queue); 244 &chip->vendor.int_queue, false);
245 status = tpm_tis_status(chip); 245 status = tpm_tis_status(chip);
246 if (status & TPM_STS_DATA_AVAIL) { /* retry? */ 246 if (status & TPM_STS_DATA_AVAIL) { /* retry? */
247 dev_err(chip->dev, "Error left over data\n"); 247 dev_err(chip->dev, "Error left over data\n");
@@ -277,7 +277,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
277 tpm_tis_ready(chip); 277 tpm_tis_ready(chip);
278 if (wait_for_tpm_stat 278 if (wait_for_tpm_stat
279 (chip, TPM_STS_COMMAND_READY, chip->vendor.timeout_b, 279 (chip, TPM_STS_COMMAND_READY, chip->vendor.timeout_b,
280 &chip->vendor.int_queue) < 0) { 280 &chip->vendor.int_queue, false) < 0) {
281 rc = -ETIME; 281 rc = -ETIME;
282 goto out_err; 282 goto out_err;
283 } 283 }
@@ -292,7 +292,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
292 } 292 }
293 293
294 wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, 294 wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c,
295 &chip->vendor.int_queue); 295 &chip->vendor.int_queue, false);
296 status = tpm_tis_status(chip); 296 status = tpm_tis_status(chip);
297 if (!itpm && (status & TPM_STS_DATA_EXPECT) == 0) { 297 if (!itpm && (status & TPM_STS_DATA_EXPECT) == 0) {
298 rc = -EIO; 298 rc = -EIO;
@@ -304,7 +304,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
304 iowrite8(buf[count], 304 iowrite8(buf[count],
305 chip->vendor.iobase + TPM_DATA_FIFO(chip->vendor.locality)); 305 chip->vendor.iobase + TPM_DATA_FIFO(chip->vendor.locality));
306 wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, 306 wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c,
307 &chip->vendor.int_queue); 307 &chip->vendor.int_queue, false);
308 status = tpm_tis_status(chip); 308 status = tpm_tis_status(chip);
309 if ((status & TPM_STS_DATA_EXPECT) != 0) { 309 if ((status & TPM_STS_DATA_EXPECT) != 0) {
310 rc = -EIO; 310 rc = -EIO;
@@ -342,7 +342,7 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
342 if (wait_for_tpm_stat 342 if (wait_for_tpm_stat
343 (chip, TPM_STS_DATA_AVAIL | TPM_STS_VALID, 343 (chip, TPM_STS_DATA_AVAIL | TPM_STS_VALID,
344 tpm_calc_ordinal_duration(chip, ordinal), 344 tpm_calc_ordinal_duration(chip, ordinal),
345 &chip->vendor.read_queue) < 0) { 345 &chip->vendor.read_queue, false) < 0) {
346 rc = -ETIME; 346 rc = -ETIME;
347 goto out_err; 347 goto out_err;
348 } 348 }