- 25 6月, 2016 7 次提交
-
-
由 Christophe Ricard 提交于
Dropped the field 'iobase' from struct tpm_vendor_specific and migrated it to the private structures of tpm_atmel and tpm_tis. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
-
由 Jarkko Sakkinen 提交于
Dropped manufacturer_id from struct tpm_vendor_specific and redeclared it in the private struct priv_data that tpm_tis uses because the field is only used tpm_tis. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
-
由 Jarkko Sakkinen 提交于
Drop field int_queue from tpm_vendor_specific as it is used only by tpm_tis. Probably all of the fields should be eventually dropped and moved to the private structures of different drivers but it is better to do this one step at a time in order not to break anything. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
-
由 Jarkko Sakkinen 提交于
rmmod crashes the driver because tpm_chip_unregister() already sets ops to NULL. This commit fixes the issue by moving tpm2_shutdown() to tpm_chip_unregister(). This commit is also cleanup because it removes duplicate code from tpm_crb and tpm_tis to the core. Fixes: 4d3eac5e156a ("tpm: Provide strong locking for device removal") Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
-
由 Jarkko Sakkinen 提交于
Created a local variable pointing to the INT_ENABLE_x register. The expression clearing INT_ENABLE_x.globalIntEnable is unreadable and hard to modify without surpassing the 80 char boundary. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NChristophe Ricard <christophe-h.ricard@st.com>
-
由 Jason Gunthorpe 提交于
Now that we have a proper struct device just use dev_name() to access this value instead of keeping two copies. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
-
由 Jason Gunthorpe 提交于
This is a hold over from before the struct device conversion. - All prints should be using &chip->dev, which is the Linux standard. This changes prints to use tpm0 as the device name, not the PnP/etc ID. - The few places involving sysfs/modules that really do need the parent just use chip->dev.parent instead - We no longer need to get_device(pdev) in any places since it is no longer used by any of the code. The kref on the parent is held by the device core during device_add and dropped in device_del Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
-
- 26 2月, 2016 1 次提交
-
-
由 Jarkko Sakkinen 提交于
drivers/char/tpm/tpm_tis.c:838: warning: ‘tpm_tis_resume’ defined but not used Reported-by: NJames Morris <jmorris@namei.org> Fixes: 00194826 ("tpm_tis: Clean up the force=1 module parameter") Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> cc: stable@vger.kernel.org
-
- 20 2月, 2016 1 次提交
-
-
由 Jarkko Sakkinen 提交于
In all cases use dev_name() for the mapped resources. This is both for sake of consistency and also with some platforms resource name given by ACPI object seems to return garbage. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Fixes: 1bd047be ("tpm_crb: Use devm_ioremap_resource")
-
- 10 2月, 2016 6 次提交
-
-
由 Jason Gunthorpe 提交于
The TPM core has long assumed that every device has a driver attached, however the force path was attaching the TPM core outside of a driver context. This isn't generally reliable as the user could detatch the driver using sysfs or something, but commit b8b2c7d8 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") forced the issue by leaving the driver pointer NULL if there is no probe. Rework the TPM setup to create a platform device with resources and then allow the driver core to naturally bind and probe it through the normal mechanisms. All this structure is needed anyhow to enable TPM for OF environments. Finally, since the entire flow is changing convert the init/exit to use the modern ifdef-less coding style when possible Reported-by: N"Wilck, Martin" <martin.wilck@ts.fujitsu.com> Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NWilck, Martin <martin.wilck@ts.fujitsu.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
This does a request_resource under the covers which means tis holds a lock on the memory range it is using so other drivers cannot grab it. When doing probing it is important to ensure that other drivers are not using the same range before tis starts touching it. To do this flow the actual struct resource from the device right through to devm_ioremap_resource. This ensures all the proper resource meta-data is carried down. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NWilck, Martin <martin.wilck@ts.fujitsu.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
If the ACPI tables do not declare a memory resource for the TPM2 then do not just fall back to the x86 default base address. Also be stricter when checking the ancillary TPM2 ACPI data and error out if any of this data is wrong rather than blindly assuming TPM1. Fixes: 399235dc ("tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0") Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NWilck, Martin <martin.wilck@ts.fujitsu.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
Instead of clearing the global interrupts flag when any device does not have an interrupt just pass -1 through tpm_info.irq. The only thing that asks for autoprobing is the force=1 path. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NWilck, Martin <martin.wilck@ts.fujitsu.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
include/acpi/actbl2.h is the proper place for these definitions and the needed TPM2 ones have been there since commit 413d4a6d ("ACPICA: Update TPM2 ACPI table") This also drops a couple of le32_to_cpu's for members of this table, the existing swapping was not done consistently, and the standard used by other Linux callers of acpi_get_table is unswapped. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NWilck, Martin <martin.wilck@ts.fujitsu.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jerry Snitselaar 提交于
tpm_tis.c already gets actbl2.h via linux/acpi.h -> acpi/acpi.h -> acpi/actbl.h -> acpi/actbl2.h, so the direct include in tpm_tis.c is not needed. Signed-off-by: NJerry Snitselaar <jsnitsel@redhat.com> Acked-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 20 12月, 2015 6 次提交
-
-
由 Jason Gunthorpe 提交于
auto-probing doesn't work with shared interrupts, and the auto detection interrupt range is for x86 only. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
Now that the probe and run cases are merged together we can use a much simpler setup flow where probe and normal setup are done with exactly the same code. Since the new flow always calls tpm_gen_interrupt to confirm the IRQ there is also no longer any need to call tpm_get_timeouts twice. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
The new code that works directly in tpm_tis_send is able to handle IRQ probing duties as well, so just use it for everything. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Signed-off--by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
IRQ probing needs to know that the TPM is working before trying to probe, so move tpm_get_timeouts() to the top of the tpm_tis_init(). This has the advantage of also getting the correct timeouts loaded before doing IRQ probing. All the timeout handling code is moved to tpm_get_timeouts() in order to remove duplicate code in tpm_tis and tpm_crb. [jarkko.sakkinen@linux.intel.com: squashed two patches together and improved the commit message.] Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
This should be done very early, before anything could possibly cause the TPM to generate an interrupt. If the IRQ line is shared with another driver causing an interrupt before setting up our handler will be very bad. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
The interrupt is always allocated with devm_request_irq so it must always be freed with devm_free_irq. Fixes: 448e9c55 ("tpm_tis: verify interrupt during init") Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Acked-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 09 11月, 2015 2 次提交
-
-
由 Martin Wilck 提交于
If the probing finishes without success, it will leave the value 15 in the TPM_IRQ_VECTOR register. If the driver is unloaded and reloaded, it will "think" that the hardware had been programmed with IRQ 15, and will not probe again. This patch restores the original value in the IO memory if no IRQ is probed. Signed-off-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Acked-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <PeterHuewe@gmx.de>
-
由 Martin Wilck 提交于
Release IRQs used for probing only. Otherwise the TPM will end up with all IRQs 3-15 assigned. Fixes: afb5abc2 ("tpm: two-phase chip management functions") Signed-off-by: NMartin Wilck <Martin.Wilck@ts.fujitsu.com> Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: NPeter Huewe <PeterHuewe@gmx.de>
-
- 19 10月, 2015 1 次提交
-
-
由 Jarkko Sakkinen 提交于
Both for FIFO and CRB interface TCG has decided to use the same HID MSFT0101. They can be differentiated by looking at the start method from TPM2 ACPI table. This patches makes necessary fixes to tpm_tis and tpm_crb modules in order to correctly detect, which module should be used. For MSFT0101 we must use struct acpi_driver because struct pnp_driver has a 7 character limitation. It turned out that the root cause in b371616b was not correct for https://bugzilla.kernel.org/show_bug.cgi?id=98181. v2: * One fixup was missing from v1: is_tpm2_fifo -> is_fifo v3: * Use pnp_driver for existing HIDs and acpi_driver only for MSFT0101 in order ensure backwards compatibility. v4: * Check for FIFO before doing *anything* in crb_acpi_add(). * There was return immediately after acpi_bus_unregister_driver() in cleanup_tis(). This caused pnp_unregister_driver() not to be called. Cc: stable@kernel.org Reported-by: NMichael Saunders <mick.saunders@gmail.com> Reported-by: NMichael Marley <michael@michaelmarley.com> Reported-by: NJethro Beekman <kernel@jbeekman.nl> Reported-by: NMatthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NMichael Marley <michael@michaelmarley.com> Tested-by: Mimi Zohar <zohar@linux.vnet.ibm.com> (on TPM 1.2) Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 15 2月, 2015 2 次提交
-
-
由 Jarkko Sakkinen 提交于
If during transmission system error was returned, the logic was to incorrectly deduce that chip is a TPM 1.x chip. This patch fixes this issue. Also, this patch changes probing so that message tag is used as the measure for TPM 2.x, which should be much more stable. A separate function called tpm2_probe() is encapsulated because it can be used with any chipset. Fixes: aec04cbd ("tpm: TPM 2.0 FIFO Interface") Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jarkko Sakkinen 提交于
Fixed suspend/resume paths for TPM 2.0 and consolidated all the associated code to the tpm_pm_suspend() and tpm_pm_resume() functions. Resume path should be handled by the firmware, i.e. Startup(CLEAR) for hibernate and Startup(STATE) for suspend. There might be some non-PC embedded devices in the future where Startup() is not the handled by the FW but fixing the code for those IMHO should be postponed until there is hardware available to test the fixes although extra Startup in the driver code is essentially a NOP. Added Shutdown(CLEAR) to the remove paths of TIS and CRB drivers. Changed tpm2_shutdown() to a void function because there isn't much you can do except print an error message if this fails with a system error. Fixes: aec04cbd ("tpm: TPM 2.0 FIFO Interface") Fixes: 30fc8d13 ("tpm: TPM 2.0 CRB Interface") [phuewe: both did send TPM_Shutdown on resume which 'disables' the TPM and did not send TPM2_Shutdown on teardown which leads some TPM2.0 to believe there was an attack (no TPM2_Shutdown = no orderly shutdown = attack)] Reported-by: NPeter Hüwe <PeterHuewe@gmx.de> Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 22 1月, 2015 1 次提交
-
-
由 Peter Huewe 提交于
This fixes a build failure if CONFIG_PNP is set but CONFIG_ACPI is not: drivers/char/tpm/tpm_tis.c: In function ?tpm_tis_pnp_init?: drivers/char/tpm/tpm_tis.c:912:45: error: invalid type argument of ?->? (have ?int?) acpi_dev_handle = pnp_acpi_device(pnp_dev)->handle; If CONFIG_PNPACPI is not set pnp_acpi_device is defined as 0 and thus accesing the handle is not possible. Fixes: 0dc55365 ("tpm: fix raciness of PPI interface lookup") Reported-by: NJim Davis <jim.epost@gmail.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NJames Morris <james.l.morris@oracle.com>
-
- 17 1月, 2015 6 次提交
-
-
由 Jarkko Sakkinen 提交于
Detect TPM 2.0 by sending idempotent TPM 2.x command. Ordinals for TPM 2.0 are higher than TPM 1.x commands so this should be fail-safe. Using STS3 is unreliable because some chips just report 0xff and not what the spec says. Before TPM family is detected, timeouts are set to the maximum values for both TPM 1.x and TPM 2.x. In addition to this, suspend/resume functionality is implemented for TPM 2.x. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: NWill Arthur <will.c.arthur@intel.com> Reviewed-by: NJasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Tested-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jarkko Sakkinen 提交于
Added own device class for TPM. Uses MISC_MAJOR:TPM_MINOR for the first character device in order to retain backwards compatibility. Added tpm_dev_release() back attached to the character device. I've been running this code now for a while on my laptop (Lenovo T430S) TrouSerS works perfectly without modifications. I don't believe it breaks anything significantly. The sysfs attributes that have been placed under the wrong place and are against sysfs-rules.txt should be probably left to stagnate under platform device directory and start defining new sysfs attributes to the char device directory. Guidelines for future TPM sysfs attributes should be probably along the lines of - Single flat set of mandatory sysfs attributes. For example, current PPI interface is way way too rich when you only want to use it to clear and activate the TPM. - Define sysfs attribute if and only if there's no way to get the value from ring-3. No attributes for TPM properties. It's just unnecessary maintenance hurdle that we don't want. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Tested-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jarkko Sakkinen 提交于
Rename chip->dev to chip->pdev to make it explicit that this not the character device but actually represents the platform device. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Tested-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jarkko Sakkinen 提交于
Traversal of the ACPI device tree was not done right. PPI interface should be looked up only from the ACPI device that is the platform device for the TPM. This could cause problems with systems with two TPM chips such as 4th gen Intel systems. In addition, added the missing license and copyright platter to the tpm_ppi.c. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jarkko Sakkinen 提交于
tpm_register_hardware() and tpm_remove_hardware() are called often before initializing the device. The problem is that the device might not be fully initialized when it comes visible to the user space. This patch resolves the issue by diving initialization into two parts: - tpmm_chip_alloc() creates struct tpm_chip. - tpm_chip_register() sets up the character device and sysfs attributes. The framework takes care of freeing struct tpm_chip by using the devres API. The broken release callback has been wiped. ACPI drivers do not ever get this callback. Regards to Jason Gunthorpe for carefully reviewing this part of the code. Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: NJasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: NScot Doyle <lkml14@scotdoyle.com> Tested-by: NPeter Huewe <peterhuewe@gmx.de> [phuewe: update to upstream changes] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Scot Doyle 提交于
Some machines, such as the Acer C720 and Toshiba CB35, have TPMs that do not send IRQs while also having an ACPI TPM entry indicating that they will be sent. These machines freeze on resume while the tpm_tis module waits for an IRQ, eventually timing out. When in interrupt mode, the tpm_tis module should receive an IRQ during module init. Fall back to polling mode if none is received when expected. Cc: <stable@vger.kernel.org> Signed-off-by: NScot Doyle <lkml14@scotdoyle.com> Tested-by: NMichael Mullin <masmullin@gmail.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> [phuewe: minor checkpatch fixed] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 30 7月, 2014 1 次提交
-
-
由 Jason Gunthorpe 提交于
Some Atmel TPMs provide completely wrong timeouts from their TPM_CAP_PROP_TIS_TIMEOUT query. This patch detects that and returns new correct values via a DID/VID table in the TIS driver. Tested on ARM using an AT97SC3204T FW version 37.16 Cc: <stable@vger.kernel.org> [PHuewe: without this fix these 'broken' Atmel TPMs won't function on older kernels] Signed-off-by: N"Berg, Christopher" <Christopher.Berg@atmel.com> Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 06 1月, 2014 4 次提交
-
-
由 Jason Gunthorpe 提交于
If CONFIG_PM_SLEEP=n, CONFIG_PNP=y we get this warning: drivers/char/tpm/tpm_tis.c:706:13: warning: 'tpm_tis_reenable_interrupts' defined but not used [-Wunused-function] This seems to have been introduced in a2fa3fb0 'tpm: convert tpm_tis driver to use dev_pm_ops from legacy pm_ops' Also, unpon reviewing, the #ifdefs around tpm_tis_pm are not right, the first reference is protected, the second is not. tpm_tis_pm is always defined so we can drop the #ifdef. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
This replaces the static initialization of a tpm_vendor_specific structure in the drivers with the standard Linux idiom of providing a const structure of function pointers. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: NAshley Lai <adlai@linux.vnet.ibm.com> [phuewe: did apply manually due to commit 191ffc6bde3 tpm/tpm_i2c_atmel: fix coccinelle warnings] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
The tpm core now sets up and controls all sysfs attributes, instead of having each driver have a unique take on it. All drivers now now have a uniform set of attributes, and no sysfs related entry points are exported from the tpm core module. This also uses the new method used to declare sysfs attributes with DEVICE_ATTR_RO and 'struct attribute *' Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> [phuewe: had to apply the tpm_i2c_atmel part manually due to commit 191ffc6bde3fc tpm/tpm_i2c_atmel: fix coccinelle warnings] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
CLASS-dev.c is a common idiom for Linux subsystems This pulls all the code related to the miscdev into tpm-dev.c and makes it static. The identical file_operation structs in the drivers are purged and the tpm common code unconditionally creates the miscdev. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: NAshley Lai <adlai@linux.vnet.ibm.com> [phuewe: tpm_dev_release is now used only in this file, thus the EXPORT_SYMBOL can be dropped and the function be marked as static. It has no other in-kernel users] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 23 10月, 2013 1 次提交
-
-
由 Jason Gunthorpe 提交于
The version of the TPM should not depend on the bus it is connected through. 1.1, 1.2 and soon 2.0 TPMS will be all be able to use the same bus interfaces. Make tpm_show_caps try the 1.2 capability first. If that fails then fall back to the 1.1 capability. This effectively auto-detects what interface the TPM supports at run-time. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NJoel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-