Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1446712
| From | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() |
| Date | 2016-07-19 22:30 +0200 |
| Message-ID | <rWJOq-ca-17@gated-at.bofh.it> (permalink) |
| References | <rWDpD-4AM-5@gated-at.bofh.it> <rWDpE-4AM-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jul 19, 2016 at 04:32:47PM +0300, Jarkko Sakkinen wrote: > Return error code from tpm_gen_interrupt() and fail tpm_tis family of > drivers on a system error. It doesn't make sense to continue if we > cannot even reach the TPM. > > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> > drivers/char/tpm/tpm-interface.c | 6 +++--- > drivers/char/tpm/tpm.h | 2 +- > drivers/char/tpm/tpm_tis_core.c | 4 +++- > 3 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c > index 88dafcd..35b2722 100644 > +++ b/drivers/char/tpm/tpm-interface.c > @@ -466,16 +466,16 @@ ssize_t tpm_getcap(struct tpm_chip *chip, __be32 subcap_id, cap_t *cap, > * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing > * a TPM error code. > */ > -void tpm_gen_interrupt(struct tpm_chip *chip) > +int tpm_gen_interrupt(struct tpm_chip *chip) drivers/char/tpm/st33zp24/st33zp24.c needs to be updated too. I looked at st33zp24.c and it looks broken, I don't see any logic that de-asserts TPM_CHIP_FLAG_IRQ if the irq test triggered by tpm_gen_interrupt, so presumably it should not be calling it at all. IMHO, DT binding devices should never auto-probe IRQS anyhow, we only do it on PC because PC is insane... If we fix st33 then I suggest just moving tpm_gen_interrupt into tpm_tis - nothing else should really be using it.. Jason
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-19 15:40 +0200
Re: [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-07-19 22:30 +0200
Re: [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-19 22:40 +0200
Re: [tpmdd-devel] [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-19 22:40 +0200
Re: [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-07-19 22:50 +0200
Re: [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-19 23:00 +0200
Re: [PATCH v3 3/5] tpm: return error code from tpm_gen_interrupt() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-19 22:40 +0200
csiph-web