From: Greg Kroah-Hartman Date: Tue, 27 Jul 2010 23:28:46 +0000 (-0700) Subject: tpm patch for .32, .33, and .34 X-Git-Tag: v2.6.27.49~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56b0afc2263e72c0b17e1e37b0d725ed5e20a767;p=thirdparty%2Fkernel%2Fstable-queue.git tpm patch for .32, .33, and .34 --- diff --git a/queue-2.6.32/series b/queue-2.6.32/series index 401a7e95a9a..2a1ae79b1c3 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -36,3 +36,4 @@ drm-i915-make-g4x-style-pll-search-more-permissive.patch drm-radeon-r200-handle-more-hw-tex-coord-types.patch drm-radeon-kms-add-quirk-for-asus-hd-3600-board.patch drm-radeon-kms-fix-legacy-lvds-dpms-sequence.patch +tpm_tis-fix-subsequent-suspend-failures.patch diff --git a/queue-2.6.32/tpm_tis-fix-subsequent-suspend-failures.patch b/queue-2.6.32/tpm_tis-fix-subsequent-suspend-failures.patch new file mode 100644 index 00000000000..94bf2079f2e --- /dev/null +++ b/queue-2.6.32/tpm_tis-fix-subsequent-suspend-failures.patch @@ -0,0 +1,47 @@ +From 59f6fbe4291fcc078ba26ce4edf8373a7620a13a Mon Sep 17 00:00:00 2001 +From: Rajiv Andrade +Date: Wed, 23 Jun 2010 12:18:56 -0700 +Subject: tpm_tis: fix subsequent suspend failures + +From: Rajiv Andrade + +commit 59f6fbe4291fcc078ba26ce4edf8373a7620a13a upstream. + +Fix subsequent suspends by issuing tpm_continue_selftest during resume. +Otherwise, the tpm chip seems to be not fully initialized and will reject +the save state command during suspend, thus preventing the whole system +to suspend. + +Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16256 + +Signed-off-by: Helmut Schaa +Signed-off-by: Rajiv Andrade +Cc: James Morris +Cc: Debora Velarde +Cc: David Safford +Signed-off-by: Andrew Morton +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/tpm/tpm_tis.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/char/tpm/tpm_tis.c ++++ b/drivers/char/tpm/tpm_tis.c +@@ -622,7 +622,14 @@ static int tpm_tis_pnp_suspend(struct pn + + static int tpm_tis_pnp_resume(struct pnp_dev *dev) + { +- return tpm_pm_resume(&dev->dev); ++ struct tpm_chip *chip = pnp_get_drvdata(dev); ++ int ret; ++ ++ ret = tpm_pm_resume(&dev->dev); ++ if (!ret) ++ tpm_continue_selftest(chip); ++ ++ return ret; + } + + static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = { diff --git a/queue-2.6.33/series b/queue-2.6.33/series index abab1014968..e36f7009f28 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -58,3 +58,4 @@ drm-radeon-kms-add-quirk-for-asus-hd-3600-board.patch drm-radeon-kms-fix-possible-mis-detection-of-sideport-on-rs690-rs740.patch drm-radeon-kms-fix-legacy-lvds-dpms-sequence.patch drm-radeon-kms-fix-legacy-tv-out-pal-mode.patch +tpm_tis-fix-subsequent-suspend-failures.patch diff --git a/queue-2.6.33/tpm_tis-fix-subsequent-suspend-failures.patch b/queue-2.6.33/tpm_tis-fix-subsequent-suspend-failures.patch new file mode 100644 index 00000000000..94bf2079f2e --- /dev/null +++ b/queue-2.6.33/tpm_tis-fix-subsequent-suspend-failures.patch @@ -0,0 +1,47 @@ +From 59f6fbe4291fcc078ba26ce4edf8373a7620a13a Mon Sep 17 00:00:00 2001 +From: Rajiv Andrade +Date: Wed, 23 Jun 2010 12:18:56 -0700 +Subject: tpm_tis: fix subsequent suspend failures + +From: Rajiv Andrade + +commit 59f6fbe4291fcc078ba26ce4edf8373a7620a13a upstream. + +Fix subsequent suspends by issuing tpm_continue_selftest during resume. +Otherwise, the tpm chip seems to be not fully initialized and will reject +the save state command during suspend, thus preventing the whole system +to suspend. + +Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16256 + +Signed-off-by: Helmut Schaa +Signed-off-by: Rajiv Andrade +Cc: James Morris +Cc: Debora Velarde +Cc: David Safford +Signed-off-by: Andrew Morton +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/tpm/tpm_tis.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/char/tpm/tpm_tis.c ++++ b/drivers/char/tpm/tpm_tis.c +@@ -622,7 +622,14 @@ static int tpm_tis_pnp_suspend(struct pn + + static int tpm_tis_pnp_resume(struct pnp_dev *dev) + { +- return tpm_pm_resume(&dev->dev); ++ struct tpm_chip *chip = pnp_get_drvdata(dev); ++ int ret; ++ ++ ret = tpm_pm_resume(&dev->dev); ++ if (!ret) ++ tpm_continue_selftest(chip); ++ ++ return ret; + } + + static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = { diff --git a/queue-2.6.34/series b/queue-2.6.34/series index f6bf0774a56..a018e03916f 100644 --- a/queue-2.6.34/series +++ b/queue-2.6.34/series @@ -67,3 +67,4 @@ drm-radeon-kms-add-quirk-for-asus-hd-3600-board.patch drm-radeon-kms-fix-possible-mis-detection-of-sideport-on-rs690-rs740.patch drm-radeon-kms-fix-legacy-lvds-dpms-sequence.patch drm-radeon-kms-fix-legacy-tv-out-pal-mode.patch +tpm_tis-fix-subsequent-suspend-failures.patch diff --git a/queue-2.6.34/tpm_tis-fix-subsequent-suspend-failures.patch b/queue-2.6.34/tpm_tis-fix-subsequent-suspend-failures.patch new file mode 100644 index 00000000000..f16ce7fa780 --- /dev/null +++ b/queue-2.6.34/tpm_tis-fix-subsequent-suspend-failures.patch @@ -0,0 +1,47 @@ +From 59f6fbe4291fcc078ba26ce4edf8373a7620a13a Mon Sep 17 00:00:00 2001 +From: Rajiv Andrade +Date: Wed, 23 Jun 2010 12:18:56 -0700 +Subject: tpm_tis: fix subsequent suspend failures + +From: Rajiv Andrade + +commit 59f6fbe4291fcc078ba26ce4edf8373a7620a13a upstream. + +Fix subsequent suspends by issuing tpm_continue_selftest during resume. +Otherwise, the tpm chip seems to be not fully initialized and will reject +the save state command during suspend, thus preventing the whole system +to suspend. + +Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16256 + +Signed-off-by: Helmut Schaa +Signed-off-by: Rajiv Andrade +Cc: James Morris +Cc: Debora Velarde +Cc: David Safford +Signed-off-by: Andrew Morton +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/tpm/tpm_tis.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/char/tpm/tpm_tis.c ++++ b/drivers/char/tpm/tpm_tis.c +@@ -623,7 +623,14 @@ static int tpm_tis_pnp_suspend(struct pn + + static int tpm_tis_pnp_resume(struct pnp_dev *dev) + { +- return tpm_pm_resume(&dev->dev); ++ struct tpm_chip *chip = pnp_get_drvdata(dev); ++ int ret; ++ ++ ret = tpm_pm_resume(&dev->dev); ++ if (!ret) ++ tpm_continue_selftest(chip); ++ ++ return ret; + } + + static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = {