Skip to content

Commit

Permalink
tpm_tis: fix subsequent suspend failures
Browse files Browse the repository at this point in the history
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 <helmut.schaa@googlemail.com>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Cc: James Morris <jmorris@namei.org>
Cc: Debora Velarde <debora@linux.vnet.ibm.com>
Cc: David Safford <safford@watson.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Rajiv Andrade authored and James Morris committed Jul 26, 2010
1 parent 86c65a7 commit 59f6fbe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,14 @@ static int tpm_tis_pnp_suspend(struct pnp_dev *dev, pm_message_t msg)

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 = {
Expand Down

0 comments on commit 59f6fbe

Please sign in to comment.