Re: [PATCH v2 5/5] Revert "tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's""

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2020-10-19 at 13:23 -0700, Jerry Snitselaar wrote:
> James Bottomley @ 2020-10-01 11:09 MST:
> 
> > Revert the patch aa4a63dd9816 which stops interrupt probing from
> > working, now that it should be safe to allow interrupt probing on
> > all
> > systems without incurring interrupt storms.
> > 
> > Signed-off-by: James Bottomley <
> > James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
> > ---
> >  drivers/char/tpm/tpm_tis_core.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/char/tpm/tpm_tis_core.c
> > b/drivers/char/tpm/tpm_tis_core.c
> > index 12b657ed3a39..23b60583928b 100644
> > --- a/drivers/char/tpm/tpm_tis_core.c
> > +++ b/drivers/char/tpm/tpm_tis_core.c
> > @@ -1117,6 +1117,7 @@ int tpm_tis_core_init(struct device *dev,
> > struct tpm_tis_data *priv, int irq,
> >  			goto out_err;
> >  		}
> >  
> > +		tpm_chip_start(chip);
> >  		if (irq) {
> >  			tpm_tis_probe_irq_single(chip, IRQF_SHARED,
> > irq);
> >  			if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
> > @@ -1128,6 +1129,7 @@ int tpm_tis_core_init(struct device *dev,
> > struct tpm_tis_data *priv, int irq,
> >  		} else {
> >  			tpm_tis_probe_irq(chip);
> >  		}
> > +		tpm_chip_stop(chip);
> >  	}
> >  
> >  	rc = tpm_chip_register(chip);
> 
> I know this is a revert, but should there be a commit on top of this
> to move the tpm_chip_start above the tpm_get_timeouts right before
> this?

Not for tpm 2: tpm2_get_timeouts doesn't actually query the device.  I
think this may be required for TPM 1.2 since it does send a
capabilities, but I don't actually know if any TPM 1.2 systems have the
ineffective locality problem this fix addresses (I don't have one to
check) ... I'm guessing not otherwise we'd have had bug reports about
TPM 1.2 failing to get the timeouts (it dumps an error message to the
logs).

James





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux