lkml.org 
[lkml]   [2007]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] TPM TIS device driver locality request
Dear all,

during the initialization of the TPM TIS driver, the necessary
locality has to be requested earlier in the init-process. Depending on
the used TPM chip, this leads to wrong information.
For example: Lenovo X61s with Atmel TPM:

tpm_tis 00:0a: 1.2 TPM (device-id 0xFFFF, rev-id 255)

But correct is:

tpm_tis 00:0c: 1.2 TPM (device-id 0x3203, rev-id 9)

This short patch fixes this issue.

Signed-Off-by Marcel Selhorst <tpm@selhorst.net>
---
--- tpm_tis.c.orig 2007-11-19 00:21:09.000000000 +0100
+++ tpm_tis.c 2007-11-19 00:21:23.000000000 +0100
@@ -450,6 +450,11 @@ static int tpm_tis_init(struct device *d
goto out_err;
}

+ if (request_locality(chip, 0) != 0) {
+ rc = -ENODEV;
+ goto out_err;
+ }
+
vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));

/* Default timeouts */
@@ -487,11 +492,6 @@ static int tpm_tis_init(struct device *d
if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
dev_dbg(dev, "\tData Avail Int Support\n");

- if (request_locality(chip, 0) != 0) {
- rc = -ENODEV;
- goto out_err;
- }
-
/* INTERRUPT Setup */
init_waitqueue_head(&chip->vendor.read_queue);
init_waitqueue_head(&chip->vendor.int_queue);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-11-19 00:39    [W:1.765 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site