RE: [PATCH resend] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-11-21 Thread Peter.Huewe
Hi Jason, >Great, I'll send an updated version, thanks! ;) You're welcome. >> >+struct tpm_startup_in { >> >+ __be16 startup_type; >> >+} __packed; >> >> >> All the other user >> __attribute__((packed)); >> Care to change to be consistent? > I used to __packed to avoid a checkpatch warning,

Re: [PATCH resend] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-11-21 Thread Jason Gunthorpe
On Wed, Nov 21, 2012 at 08:59:24AM +, peter.hu...@infineon.com wrote: > I just gave the new version a run on my beagleboard with our Infineon SLB9635 > TT 1.2 Soft I2C TPM > and it seems to work as expected. (Tested with and without previous startup). > > Tested-by: Peter Huewe Great, I'll

RE: [PATCH resend] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-11-21 Thread Peter.Huewe
Hi Jason, Hi Kent, > >Discussion on this got a bit sidetracked talking about >suspend/resume.. To be clear, this fixes a real, serious, problem on >normal embedded cases where the kernel refuses to attach the TPM driver >at all. > >Key, are you happy with this as-is for the next merge window? > >Th

[PATCH resend] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-11-20 Thread 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: Jason Gunthorpe --- drivers/char/tpm/tpm.