tpm2: driver should retry sending Shutdown(STATE) and block suspending if it fails |
|||||||
Issue descriptionIn tpm 2.0 case, sending Shutdown(STATE) from tpm_pm_suspend() during S0->S3 transition may fail. For example, due to a transient communication error on a bus. In this case, the state won't be saved and the restored on resume, and Startup(STATE) on S3->S0 would also fail. As it is already done in tpm 1.2 case in tpm_pm_suspend(), the driver should retry sending Shutdown(STATE) several times, and return an error from tpm_pm_suspend() to allow blocking the OS suspend process.
,
Mar 22 2017
,
Mar 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e0472db680800ededc676660724be636cf413786 commit e0472db680800ededc676660724be636cf413786 Author: Andrey Pronin <apronin@chromium.org> Date: Sat Mar 25 00:36:18 2017 CHROMIUM: tpm: cr50_i2c: retry in case of bus errors Transient bus errors may lead to a failure to transmit a tpm command or receive a response. Retry several times, if the i2c bus driver returns an error for an operation. BUG=chromium:703722 BUG=b:36462358 BUG=b:35648537 TEST=Build, deploy, go through S3 suspend-resumes. Change-Id: If2cd3ba3fb9c6f7376f759ceb2cc10df6b316ed1 Signed-off-by: Andrey Pronin <apronin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457786 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com> [modify] https://crrev.com/e0472db680800ededc676660724be636cf413786/drivers/char/tpm/cr50_i2c.c
,
Mar 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d0e2f79d755a55befed1e744f93cfa70392c1025 commit d0e2f79d755a55befed1e744f93cfa70392c1025 Author: Andrey Pronin <apronin@chromium.org> Date: Tue Mar 28 01:21:42 2017 CHROMIUM: tpm: cr50_i2c: retry in case of bus errors Transient bus errors may lead to a failure to transmit a tpm command or receive a response. Retry several times, if the i2c bus driver returns an error for an operation. BUG=chromium:703722 BUG=b:36462358 BUG=b:35648537 TEST=Build, deploy, go through S3 suspend-resumes. Change-Id: If2cd3ba3fb9c6f7376f759ceb2cc10df6b316ed1 Signed-off-by: Andrey Pronin <apronin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457786 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com> (cherry picked from commit e0472db680800ededc676660724be636cf413786) Reviewed-on: https://chromium-review.googlesource.com/459757 Reviewed-by: YH Lin <yueherngl@chromium.org> Commit-Queue: Keith Tzeng <keith.tzeng@quantatw.com> Tested-by: Keith Tzeng <keith.tzeng@quantatw.com> [modify] https://crrev.com/d0e2f79d755a55befed1e744f93cfa70392c1025/drivers/char/tpm/cr50_i2c.c
,
Mar 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a2d102bb236dd09ef7f4919a0ca4a42da1ec4d4a commit a2d102bb236dd09ef7f4919a0ca4a42da1ec4d4a Author: Andrey Pronin <apronin@chromium.org> Date: Tue Mar 28 07:10:56 2017 CHERRY-PICK: CHROMIUM: tpm: cr50_i2c: retry in case of bus errors Transient bus errors may lead to a failure to transmit a tpm command or receive a response. Retry several times, if the i2c bus driver returns an error for an operation. BUG=chromium:703722 BUG=b:36462358 BUG=b:35648537 TEST=Build, deploy, go through S3 suspend-resumes. Change-Id: I2dd6e1f6c8999e263366908499203879b2348824 Reviewed-on: https://chromium-review.googlesource.com/461757 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> [modify] https://crrev.com/a2d102bb236dd09ef7f4919a0ca4a42da1ec4d4a/drivers/char/tpm/cr50_i2c.c
,
Mar 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d3ff5b0ccadb9209f367dd985b4e847348d62ff0 commit d3ff5b0ccadb9209f367dd985b4e847348d62ff0 Author: Andrey Pronin <apronin@chromium.org> Date: Tue Mar 28 21:50:38 2017 CHROMIUM: tpm: cr50_i2c: retry in case of bus errors Transient bus errors may lead to a failure to transmit a tpm command or receive a response. Retry several times, if the i2c bus driver returns an error for an operation. BUG=chromium:703722 BUG=b:36462358 BUG=b:35648537 TEST=Build, deploy, go through S3 suspend-resumes. Change-Id: If2cd3ba3fb9c6f7376f759ceb2cc10df6b316ed1 Signed-off-by: Andrey Pronin <apronin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457786 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com> (cherry picked from commit e0472db680800ededc676660724be636cf413786) Reviewed-on: https://chromium-review.googlesource.com/462023 [modify] https://crrev.com/d3ff5b0ccadb9209f367dd985b4e847348d62ff0/drivers/char/tpm/cr50_i2c.c
,
Apr 13 2017
The retry part is fixed. The 'block suspending' part is not done, but it is never observed in practice, so reducing Pri.
,
Oct 12
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by apronin@chromium.org
, Mar 22 2017Status: Started (was: Assigned)