- 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 38 次提交
-
-
由 Peter Huewe 提交于
Maybe it helps people finding the right tree and also simplifies tracking of their patches Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
st33zp24 exists in i2c and spi version. Both have different possible configuration. st33zp24.txt is renamed st33zp24-i2c.txt. Reviewed-by: NJason Gunthorpe <jason.gunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
include/linux/platform_data/tpm_i2c_stm_st33.h can be used by other st33 tpm device driver not using i2c protocol. Reviewed-by: NJason Gunthorpe <jason.gunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Some places are still using r instead of ret. Reviewed-by: NJason Gunthorpe <jason.gunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Cleanup header description and correct some indent. Reviewed-by: NJason Gunthorpe <jason.gunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Remove some useless spaces (new line or space) Reviewed-by: NJason Gunthorpe <jason.gunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Add a return value check when reading data from the FIFO register. Cc: <stable@vger.kernel.org> Reviewed-by: NJason Gunthorpe <jason.gunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Reviewed-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 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 提交于
tpm_crb is a driver for TPM 2.0 Command Response Buffer (CRB) Interface as defined in PC Client Platform TPM Profile (PTP) Specification. Only polling and single locality is supported as these are the limitations of the available hardware, Platform Trust Techonlogy (PTT) in Haswell CPUs. The driver always applies CRB with ACPI start because PTT reports using only ACPI start as start method but as a result of my testing it requires also CRB start. 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> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 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>
-
由 Ashley Lai 提交于
Added myself as a maintainer for the IBM vtpm driver and removed myself from the tpm maintainer list. Also, updated the tpm_ibmvtpm driver with my current email address. Signed-off-by: NAshley Lai <ashleydlai@gmail.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
If !client the kernel mays oops in dev_info when doing client->dev. Reported-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Many changes were added to the driver so increment the version. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Remove useless i2c read on TPM_INT_ENABLE and TPM_INT_STATUS Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Improve the irq management by using a new function wait_for_stat. Instead of using a completion struct, we rely on the waitqueue read_queue and int_queue from chip->vendor field. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Cleanup code indentation, braces, test variable when NULL. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
st33zp24 tpm can be seen as a trivial i2c device as other i2c tpm. However several other properties needs to be documented such as lpcpd. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Add tpm_stm_st33_i2c dts structure keeping backward compatibility with static platform_data support as well. In the mean time to easy this update and to make it much simpler, we: - Moved all gpio_request to devm_gpio_request_one primitive - Moved request_irq to devm_request_irq Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
For sanity, replace every tpm_st33_* with tpm_stm_* Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Some functions return err, rc or ret for a status code. Return ret instead for all of them. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
The serirq gpio pin is used only as interrupt. After driver initialization, the serirq signal is always used through interrupt and never with gpio kernel API. The irq can then be initialized during the platform_data definition within the client->irq pin. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
In order to clean big buffers in st33zp24_platform_data structure, replace with tpm_stm_dev for driver internal usage. As only one buffer is really necessary replace with buf field. In the mean time move tpm_i2c_stm_st33.h to include/linux/platform_data. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Move tpm registers to tpm_i2c_stm_st33.c. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
Fix: - WARNING: Missing a blank line after declarations - WARNING: braces {} are not necessary for any arm of this statement Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
The Free Software Foundation may have mail address change. In order to be sure to have up to date mail address give an url to the license which includes accurate informations. Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
STMicroelectronics i2c tpm is the only one to have a different tristate label. Rename it "TPM Interface Specification 1.2 Interface (I2C - STMicroelectronics)" Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> [phuewe: corrected module name in the helptext] Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Christophe Ricard 提交于
When sending data in tpm_stm_i2c_send, each loop iteration send buf. Send buf + i instead as the goal of this for loop is to send a number of byte from buf that fit in burstcnt. Once those byte are sent, we are supposed to send the next ones. The driver was working because the burstcount value returns always the maximum size for a TPM command or response. (0x800 for a command and 0x400 for a response). Cc: stable@vger.kernel.org Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Markus Elfring 提交于
The tpm_dev_vendor_release() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Fabian Frederick 提交于
sizeof(u8) is always 1. Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 Hon Ching (Vicky) Lo 提交于
There was an oops in tpm_ibmvtpm_get_desired_dma, which caused kernel panic during boot when vTPM is enabled in Power partition configured in AMS mode. vio_bus_probe calls vio_cmo_bus_probe which calls tpm_ibmvtpm_get_desired_dma to get the size needed for DMA allocation. The problem is, vio_cmo_bus_probe is called before calling probe, which for vtpm is tpm_ibmvtpm_probe and it's this function that initializes and sets up vtpm's CRQ and gets required data values. Therefore, since this has not yet been done, NULL is returned in attempt to get the size for DMA allocation. We added a NULL check. In addition, a default buffer size will be set when NULL is returned. Cc: <stable@vger.kernel.org> Signed-off-by: NHon Ching (Vicky) Lo <honclo@linux.vnet.ibm.com> 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>
-
由 Kiran Padwal 提交于
Currently these driver are missing a check on the return value of devm_kzalloc, which would cause a NULL pointer dereference in a OOM situation. This patch adds a missing check for tpm_i2c_atmel.c and tpm_i2c_nuvoton.c Cc: stable@vger.kernel.org Signed-off-by: NKiran Padwal <kiran.padwal@smartplayin.com> Reviewed-By: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
由 David Howells 提交于
Add newly registered TPMs to the tail of the list, not the beginning, so that things that are specifying TPM_ANY_NUM don't find that the device they're using has inadvertently changed. Adding a second device would break IMA, for instance. Cc: stable@vger.kernel.org Signed-off-by: NDavid Howells <dhowells@redhat.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
-
- 15 1月, 2015 1 次提交
-
-
由 James Morris 提交于
Merge tag 'keys-next-fixes-20150114' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
-