Skip to contentSkip to conversation

TPM TIS device driver locality request

PATCH In review Marcel Selhorst 2 participants 3 messages Nov 18, 2007 – Nov 21, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]>
---

tpm_tis.c 2007-11-19 00:21:23.000000000 +0100 renamed from tpm_tis.c.orig 2007-11-19 00:21:09.000000000 +0100 +5 -5
@@ -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);
#1 lore raw
Quoted 7 lines · On Mon, 19 Nov 2007 00:32:51 +0100 Marcel Selhorst <[email protected]> wrote:

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:

Quoted 7 lines

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.

Is this bug sufficiently serious to warrant inclusion of the fix in 2.6.24? 2.6.23.x?

It looks like it's just a cosmetic thing, but I'd like to check...

Quoted 1 line

Signed-Off-by Marcel Selhorst <[email protected]>

Signed-off-by , please.

tpm_tis.c 2007-11-19 00:21:23.000000000 +0100

Quoted 3 lines

---

tpm_tis.c 2007-11-19 00:21:23.000000000 +0100 renamed from tpm_tis.c.orig 2007-11-19 00:21:09.000000000 +0100 +0 -0

`patch -p1' form, please. This should have been

--- a/drivers/char/tpm/tpm_tis.c
+++ a/drivers/char/tpm/tpm_tis.c

tpm_tis.c 2007-11-19 00:21:23.000000000 +0100 static int tpm_tis_init(struct device *d · line 457

Quoted 9 lines
tpm_tis.c 2007-11-19 00:21:23.000000000 +0100 renamed from tpm_tis.c.orig 2007-11-19 00:21:09.000000000 +0100 +5 -0
@@ -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;
+       }
+

Your email client is converting tabs to spaces.

http://mbligh.org/linuxdocs/Email/Clients/Thunderbird has help for this.

Thanks.

#2 lore raw

Hi,

Quoted 6 lines
Quoted 4 lines

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.

Is this bug sufficiently serious to warrant inclusion of the fix in 2.6.24? 2.6.23.x?

I think including the patch for 2.6.24 is enough.

Quoted 2 lines

Your email client is converting tabs to spaces.
http://mbligh.org/linuxdocs/Email/Clients/Thunderbird has help for this.

Thanks for the hint,

Best regards,
Marcel Selhorst