- 15 2月, 2015 1 次提交
-
-
由 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>
-
- 18 1月, 2015 1 次提交
-
-
由 Bruno E O Meneguele 提交于
Fixed some coding style issues reported by checkpatch. Signed-off-by: NBruno E O Meneguele <bmeneguele@gmail.com> [phuewe: ported to latest code] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 17 1月, 2015 6 次提交
-
-
由 Jarkko Sakkinen 提交于
TPM 2.0 devices are separated by adding a field 'flags' to struct tpm_chip and defining a flag TPM_CHIP_FLAG_TPM2 for tagging them. This patch adds the following internal functions: - tpm2_get_random() - tpm2_get_tpm_pt() - tpm2_pcr_extend() - tpm2_pcr_read() - tpm2_startup() Additionally, the following exported functions are implemented for implementing TPM 2.0 device drivers: - tpm2_do_selftest() - tpm2_calc_ordinal_durations() - tpm2_gen_interrupt() The existing functions that are exported for the use for existing subsystems have been changed to check the flags field in struct tpm_chip and use appropriate TPM 2.0 counterpart if TPM_CHIP_FLAG_TPM2 is est. The code for tpm2_calc_ordinal_duration() and tpm2_startup() were originally written by Will Arthur. 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> [phuewe: Fixed copy paste error * 2] 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>
-
由 Jarkko Sakkinen 提交于
Merged transmit_cmd() functions in tpm-interface.c and tpm-sysfs.c. Added "tpm_" prefix for consistency sake. Changed cmd parameter as opaque. This enables to use separate command structures for TPM1 and TPM2 commands in future. Loose coupling works fine here. 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>
-
- 06 1月, 2014 6 次提交
-
-
由 Jason Gunthorpe 提交于
This consolidates everything that is only used within tpm-dev.c into tpm-dev.c and out of the publicly visible struct tpm_chip. The per-file allocation lays the ground work for someday fixing the strange forced O_EXCL behaviour of the current code. 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> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Jason Gunthorpe 提交于
This builds on the last commit to use the ops structure in the core and reduce the size of tpm_vendor_specific. 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> 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-sysfs.c is a common idiom for linux subsystems. This is the first step to pulling all the sysfs support code from the drivers into tpm-sysfs. This is a plain text copy from tpm-interface with support changes to make it compile. _tpm_pcr_read is made non-static and is called tpm_pcr_read_dev. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> 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 2 次提交
-
-
由 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>
-
由 Jason Gunthorpe 提交于
Just put the memory directly in the chip structure, rather than in a 2nd dedicated kmalloc. 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> Acked-by: NAshley Lai <adlai@linux.vnet.ibm.com>
-
- 28 5月, 2013 1 次提交
-
-
由 Peter Huewe 提交于
The 81198078 commit reintroduced a regression (error: __ksymtab_tpm_dev_release causes a section type conflict) that was fixed by commit cbb2ed4a. Fix it for good by adding the prototype to tpm.h so sparse doesn't complain about it anymore. Reported-by: NTony Camuso <tcamuso@redhat.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 22 5月, 2013 1 次提交
-
-
由 Mimi Zohar 提交于
IMA requires access to TPM_DIGEST_SIZE definition. This patch moves the definition to <linux/tpm.h>. Signed-off-by: NMimi Zohar <zohar@us.ibm.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
- 17 4月, 2013 1 次提交
-
-
由 Duncan Laurie 提交于
If the TPM has already been sent a SaveState command before the driver is loaded it may have problems sending that same command again later. This issue is seen with the Chromebook Pixel due to a firmware bug in the legacy mode boot path which is sending the SaveState command before booting the kernel. More information is available at http://crbug.com/203524 This change introduces a retry of the SaveState command in the suspend path in order to work around this issue. A future firmware update should fix this but this is also a trivial workaround in the driver that has no effect on systems that do not show this problem. When this does happen the TPM responds with a non-fatal TPM_RETRY code that is defined in the specification: The TPM is too busy to respond to the command immediately, but the command could be resubmitted at a later time. The TPM MAY return TPM_RETRY for any command at any time. It can take several seconds before the TPM will respond again. I measured a typical time between 3 and 4 seconds and the timeout is set at a safe 5 seconds. It is also possible to reproduce this with commands via /dev/tpm0. The bug linked above has a python script attached which can be used to test for this problem. I tested a variety of TPMs from Infineon, Nuvoton, Atmel, and STMicro but was only able to reproduce this with LPC and I2C TPMs from Infineon. The TPM specification only loosely defines this behavior: TPM Main Level 2 Part 3 v1.2 r116, section 3.3. TPM_SaveState: The TPM MAY declare all preserved values invalid in response to any command other than TPM_Init. TCG PC Client BIOS Spec 1.21 section 8.3.1. After issuing a TPM_SaveState command, the OS SHOULD NOT issue TPM commands before transitioning to S3 without issuing another TPM_SaveState command. TCG PC Client TIS 1.21, section 4. Power Management: The TPM_SaveState command allows a Static OS to indicate to the TPM that the platform may enter a low power state where the TPM will be required to enter into the D3 power state. The use of the term "may" is significant in that there is no requirement for the platform to actually enter the low power state after sending the TPM_SaveState command. The software may, in fact, send subsequent commands after sending the TPM_SaveState command. Change-Id: I52b41e826412688e5b6c8ddd3bb16409939704e9 Signed-off-by: NDuncan Laurie <dlaurie@chromium.org> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
- 05 2月, 2013 6 次提交
-
-
由 Stefan Berger 提交于
Support cancellation of TPM commands when driver is used in interrupt mode. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
On one of my machines the cancellation of TPM commands does not work. The reason is that by writing into sysfs 'cancel' the tpm_tis_ready call causes the status flag TPM_STS_VALID to be set in the statusregister. However, the TIS driver seems to wait for TPM_STS_COMMAND_READY. Once a 2nd time sysfs 'cancel' is written to, the TPM_STS_COMMAND_READY flag also gets set, resulting in TPM_STS_VALID|TPM_STS_COMMAND_READY to be read from the status register. This patch now converts req_canceled into a function to enable more complex comparisons against possible cancellation status codes. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
Store the TPM vendor ID for later use. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Kent Yoder 提交于
"data" was too generic a name for what's being used as a generic private pointer by vendor-specific code. Rename it to "priv" and provide a #define for users. Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Jason Gunthorpe 提交于
This seems to be preferred these days. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Jason Gunthorpe 提交于
The TPM will respond to TPM_GET_CAP with TPM_ERR_INVALID_POSTINIT if TPM_STARTUP has not been issued. Detect this and automatically issue TPM_STARTUP. This is for embedded applications where the kernel is the first thing to touch the TPM. Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NPeter Huewe <peter.huewe@infineon.com> Reviewed-by: NPeter Huewe <peter.huewe@infineon.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
- 10 10月, 2012 1 次提交
-
-
由 Gang Wei 提交于
This patch try to fix the S3 regression https://lkml.org/lkml/2012/10/5/433, which includes below line: [ 1554.684638] sysfs: cannot create duplicate filename '/devices/pnp0/00:0c/ppi' The root cause is that ppi sysfs teardown code is MIA, so while S3 resume, the ppi kobject will be created again upon existing one. To make the tear down code simple, change the ppi subfolder creation from using kobject_create_and_add to just using a named ppi attribute_group. Then ppi sysfs teardown could be done with a simple sysfs_remove_group call. Adjusted the name & return type for ppi sysfs init function. Reported-by: NBen Guthro <ben@guthro.net> Signed-off-by: NGang Wei <gang.wei@intel.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
- 23 8月, 2012 4 次提交
-
-
由 Xiaoyan Zhang 提交于
The Physical Presence Interface enables the OS and the BIOS to cooperate and provides a simple and straightforward platform user experience for administering the TPM without sacrificing security. V2: separate the patch out in a separate source file, add #ifdef CONFIG_ACPI so it compiles out on ppc, use standard error instead of ACPI error as return code of show/store fns. V3: move #ifdef CONFIG_ACPI from .c file to .h file. V4: move tpm_ppi code from tpm module to tpm_bios module. V5: modify sys_add_ppi() so that ppi_attr_grp doesn't need to be exported Signed-off-by: NXiaoyan Zhang <xiaoyan.zhang@intel.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Ashley Lai 提交于
This patch retrieves the event log data from the device tree during file open. The event log data will then displayed through securityfs. Signed-off-by: NAshley Lai <adlai@us.ibm.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Ashley Lai 提交于
This patch adds a new device driver to support IBM virtual TPM (vTPM) for PPC64. IBM vTPM is supported through the adjunct partition with firmware release 740 or higher. With vTPM support, each lpar is able to have its own vTPM without the physical TPM hardware. This driver provides TPM functionalities by communicating with the vTPM adjunct partition through Hypervisor calls (Hcalls) and Command/Response Queue (CRQ) commands. Signed-off-by: NAshley Lai <adlai@us.ibm.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
由 Kent Yoder 提交于
Move the tpm_get_random api from the trusted keys code into the TPM device driver itself so that other callers can make use of it. Also, change the api slightly so that the number of bytes read is returned in the call, since the TPM command can potentially return fewer bytes than requested. Acked-by: NDavid Safford <safford@linux.vnet.ibm.com> Reviewed-by: NH. Peter Anvin <hpa@linux.intel.com> Signed-off-by: NKent Yoder <key@linux.vnet.ibm.com>
-
- 11 7月, 2012 1 次提交
-
-
由 Rafael J. Wysocki 提交于
The tpm_pm_suspend()'s second argument of type pm_message_t is not used, so remove it. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 15 2月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
Detect iTPMs through the vendor ID on the hardware interface and only probe the device if the manufacturer is found to be Intel. This obsoletes a previously added delay necessary for some TPMs but not iTPMs. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
-
- 19 1月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
This patch fixes an (ACPI S3) suspend regression introduced in commit 68d6e671 ("tpm: Introduce function to poll for result of self test") and occurring with an Infineon TPM and tpm_tis and tpm_infineon drivers active. The suspend problem occurred if the TPM was disabled and/or deactivated and therefore the TPM_PCRRead checking the result of the (asynchronous) self test returned an error code which then caused the tpm_tis driver to become inactive and this then seemed to have negatively influenced the suspend support by the tpm_infineon driver... Besides that the tpm_tis drive may stay active even if the TPM is disabled and/or deactivated. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: NRafael J. Wysocki <rjw@sisk.pl> Acked-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 16 11月, 2011 5 次提交
-
-
由 Rajiv Andrade 提交于
It's incorrect to assume that buffers returned by the TPM 10 bytes long are always error reports. This patches parses the error field in its header instead. The error report is now being printed using dev_err() instead of dev_dbg(), making it easier for users to provide more detailed bug reports. Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
-
由 Rajiv Andrade 提交于
Moved wait_for_stat to tpm.c so that other drivers can use it. Also renamed it to avoid future namespace conflicts. Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
This patch introduces a function that runs the TPM_ContinueSelfTest() function and then polls the TPM to check whether it finished the selftest and can receive new commands. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
Cleanup the tpm_continue_selftest function. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
Have the tpm_get_timeouts function return an error code. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 13 7月, 2011 2 次提交
-
-
由 Stefan Berger 提交于
This patch fixes several aspects of the probing for interrupts. This patch reads the TPM's timeouts before probing for the interrupts. The tpm_get_timeouts() function is invoked in polling mode and gets the proper timeouts from the TPM so that we don't need to fall back to 2 minutes timeouts for short duration commands while the interrupt probing is happening. This patch introduces a variable probed_irq into the vendor structure that gets the irq number if an interrupt is received while the the tpm_gen_interrupt() function is run in polling mode during interrupt probing. Previously some parts of tpm_gen_interrupt() were run in polling mode, then the irq variable was set in the interrupt handler when an interrupt was received and execution of tpm_gen_interrupt() ended up switching over to interrupt mode. tpm_gen_interrupt() execution ended up on an event queue where it eventually timed out since the probing handler doesn't wake any queues. Before calling into free_irq() clear all interrupt flags that may have been set by the TPM. The reason is that free_irq() will call into the probing interrupt handler and may otherwise fool us into thinking that a real interrupt happened (because we see the flags as being set) while the TPM's interrupt line is not even connected to anything on the motherboard. This solves a problem on one machine I did testing on (Thinkpad T60). If a TPM claims to use a specifc interrupt, the probing is done as well to verify that the interrupt is actually working. If a TPM indicates that it does not use a specific interrupt (returns '0'), probe all interrupts from 3 to 15. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
Display the TPM's interface timeouts in a 'timeouts' sysfs entry. Display the entries as having been adjusted when they were scaled due to their values being reported in milliseconds rather than microseconds. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
-