Re: [PATCH v4] 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 09:17:54PM +0100, Peter H?we wrote: > Care to change to > > + "A TPM error (%zd) occurred attempting to determine the > > timeouts\n", > > Sorry that I didn't spot it earlier. Right.. Probably like this in my tree because of:

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

2012-11-21 Thread Peter Hüwe
Hi Jason, Thanks for the updated patch! Sorry, I have one really minor remark left: > + if (rc) { > + dev_err(chip->dev, > + "A TPM error (%d) occurred attempting to determine the > timeouts\n", rc is a ssize_t here and when compiling with C=1 I get

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

2012-11-21 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 Tested-by: Peter Huewe

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

2012-11-21 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

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

2012-11-21 Thread Peter Hüwe
Hi Jason, Thanks for the updated patch! Sorry, I have one really minor remark left: + if (rc) { + dev_err(chip-dev, + A TPM error (%d) occurred attempting to determine the timeouts\n, rc is a ssize_t here and when compiling with C=1 I get

Re: [PATCH v4] 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 09:17:54PM +0100, Peter H?we wrote: Care to change to + A TPM error (%zd) occurred attempting to determine the timeouts\n, Sorry that I didn't spot it earlier. Right.. Probably like this in my tree because of: