Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
tpm: Autodetect itpm devices

+24
+24
drivers/char/tpm/tpm_tis.c
··· 25 25 #include <linux/slab.h> 26 26 #include <linux/interrupt.h> 27 27 #include <linux/wait.h> 28 + #include <linux/acpi.h> 28 29 #include "tpm.h" 29 30 30 31 #define TPM_HEADER_SIZE 10 ··· 78 77 79 78 static LIST_HEAD(tis_chips); 80 79 static DEFINE_SPINLOCK(tis_lock); 80 + 81 + #ifdef CONFIG_ACPI 82 + static int is_itpm(struct pnp_dev *dev) 83 + { 84 + struct acpi_device *acpi = pnp_acpi_device(dev); 85 + struct acpi_hardware_id *id; 86 + 87 + list_for_each_entry(id, &acpi->pnp.ids, list) { 88 + if (!strcmp("INTC0102", id->id)) 89 + return 1; 90 + } 91 + 92 + return 0; 93 + } 94 + #else 95 + static int is_itpm(struct pnp_dev *dev) 96 + { 97 + return 0; 98 + } 99 + #endif 81 100 82 101 static int check_locality(struct tpm_chip *chip, int l) 83 102 { ··· 492 471 dev_info(dev, 493 472 "1.2 TPM (device-id 0x%X, rev-id %d)\n", 494 473 vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0))); 474 + 475 + if (is_itpm(to_pnp_dev(dev))) 476 + itpm = 1; 495 477 496 478 if (itpm) 497 479 dev_info(dev, "Intel iTPM workaround enabled\n");