Hi Hao, When posting to the mailing list, please respond using plain text and inline/bottom post. On Wed, 2020-09-30 at 22:26 -0700, Hao Wu wrote: > 7.1 > > - Jarkko’s proposal: Using msleep(TPM_TIMEOUT) for wait_for_tpm_stat(), resolve > the Atmel crash as we expect. > > --- > drivers/char/tpm/tpm_tis_core.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c > index 65ab1b027949..7dd9bcff542d 100644 > --- a/drivers/char/tpm/tpm_tis_core.c > +++ b/drivers/char/tpm/tpm_tis_core.c > @@ -80,8 +80,9 @@ static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, > } > } else { > do { > - usleep_range(TPM_TIMEOUT_USECS_MIN, > - TPM_TIMEOUT_USECS_MAX); > + msleep(TPM_TIMEOUT); > + // usleep_range(TPM_TIMEOUT_USECS_MIN, > + // TPM_TIMEOUT_USECS_MAX); > status = chip->ops->status(chip); > if ((status & mask) == mask) > return 0; > -- > 2.17.1 > > But I think tpm_msleep(15) is still the right way to go. Using msleep is definitely not the right way of going. Please refer to commit a233a0289cf9 ("tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver") for a detailed explanation. thanks, Mimi