public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Selhorst <tpm@selhorst.net>
To: Andrew Morton <akpm@osdl.org>
Cc: TPM Device Driver List <tpmdd-devel@lists.sourceforge.net>,
	linux-kernel@vger.kernel.org, Kylene Jo Hall <kjhall@us.ibm.com>
Subject: [PATCH] TPM TIS device driver locality request
Date: Mon, 19 Nov 2007 00:32:51 +0100	[thread overview]
Message-ID: <4740CBA3.4090708@selhorst.net> (raw)

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);

             reply	other threads:[~2007-11-18 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18 23:32 Marcel Selhorst [this message]
2007-11-20  6:23 ` [PATCH] TPM TIS device driver locality request Andrew Morton
2007-11-21  8:29   ` Marcel Selhorst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4740CBA3.4090708@selhorst.net \
    --to=tpm@selhorst.net \
    --cc=akpm@osdl.org \
    --cc=kjhall@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox