Re: [PATCH] tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers

From: Jarkko Sakkinen
Date: Thu Apr 27 2023 - 13:27:03 EST


On Thu Apr 27, 2023 at 6:33 PM EEST, Lino Sanfilippo wrote:
>
> Hi Jarkko,
>
> On 27.04.23 12:52, Jarkko Sakkinen wrote:
> > ATTENTION: This e-mail is from an external sender. Please check attachments and links before opening e.g. with mouseover.
> >
> >
> > On Thu, 2023-04-27 at 09:58 +0800, Pengfei Xu wrote:
> >> On 2023-04-26 at 21:58:33 +0300, Jarkko Sakkinen wrote:
> >>> TPM chip bootstrapping was removed from tpm_chip_register(), and it
> >>> was relocated to tpm_tis_core. This breaks all drivers which are not
> >>> based on tpm_tis because the chip will not get properly initialized.
> >>>
> >>> Take the corrective steps:
> >>> 1. Rename tpm_chip_startup() as tpm_chip_bootstrap() and make it one-shot.
> >>> 2. Call tpm_chip_bootstrap() in tpm_chip_register(), which reverts the
> >>> things as tehy used to be.
> >> ^ two space and one typo "they"
> >> Thanks for your fixed patch in short time!
> >>
> >> And I tested this patch, it could not be reproduced in 155s, and the patch
> >> fixed this issue.
> >> Fixed dmesg is in attached.
> >>
> >> Tested-by: Pengfei Xu <pengfei.xu@xxxxxxxxx>
> >
> > Thanks a lot! I'll take immediate action to send PR to Linus.
> >
> > Lino: no worries. It was expected that such a large refactorization
> > could break a thing or two. You did a good job in any case.
> >
> > BR, Jarkko
>
> I guess you are right, there will probably be more issues showing up
> in the next time. I will try my best to help fixing them.
> Thank you very much (also for fixing this issue)!

Yeah, no worries, that is my responsibility in the end to take care of
whatever I accept :-) And yeah, this was complicated change to do, I
think you did your best and that is good enough as far as I'm concerned.

BR, Jarkko