Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=05a462afe80553550bc77afc724ce60b42ad587e Commit: 05a462afe80553550bc77afc724ce60b42ad587e Parent: 19fd4bb2a0cfede054e4904e0b167e0ca4f36cc7 Author: Marcel Selhorst <[EMAIL PROTECTED]> AuthorDate: Wed Nov 28 16:21:27 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Thu Nov 29 09:24:52 2007 -0800
TPM: fix TIS device driver locality request 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]> Cc: Kylene Jo Hall <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/char/tpm/tpm_tis.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index fd771a4..81503d9 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -450,6 +450,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, 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 *dev, resource_size_t start, 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 git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html