[0/2,SRU,B/OEM-B] Fix resume failure on some TPM chips
mbox series

Message ID 20190710094112.13345-1-aaron.ma@canonical.com
Headers show
  • Fix resume failure on some TPM chips
Related show


Aaron Ma July 10, 2019, 9:41 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1836031

System will reboot when resume from S3 with some TPM chips installed.

stable patch is merged in 4.15 kernel:
888d867df441 (tpm: cmd_ready command can be issued only after granting
it needs a fix:
tpm: separate cmd_ready/go_idle from runtime_pm
these 2 patches fix the issue and enable tpm resume
after seprating cmd_ready/go_idle.

Verified on hardware. resume from S3 about 30 times with positive

[Regression Potential]
Medium, stable patches backported. Verified on hardware.
backported with minor adjustion.

These 2 patches are included in 4.18 and 5.0 kernel, only 4.15 needs

Tomas Winkler (2):
  tpm: separate cmd_ready/go_idle from runtime_pm
  tpm: tpm_try_transmit() refactor error flow.

 drivers/char/tpm/tpm-interface.c |  58 ++++++++++++++----
 drivers/char/tpm/tpm.h           |  12 +++-
 drivers/char/tpm/tpm2-space.c    |  16 +++--
 drivers/char/tpm/tpm_crb.c       | 101 +++++++++----------------------
 include/linux/tpm.h              |   2 +
 5 files changed, 94 insertions(+), 95 deletions(-)