]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / TPM: Fix resume regression on Chromebooks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 11 May 2014 23:13:28 +0000 (01:13 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 11 May 2014 23:13:28 +0000 (01:13 +0200)
commit27e9260eb5797662ae4a151a06f99109ea5fac68
treeee0781a595299c17001d56f146d9a460ebfd606d
parent992383c95ec7ad652d78c0258f849d6a422720f4
ACPI / TPM: Fix resume regression on Chromebooks

Chromebooks (at least Acer C720 and Pixel) implement an ACPI object
for TPM, but don't implement the _DSM method to support PPI.  As
a result, the TPM driver fails to load on those machines after
commit dfef2bf5c1da (ACPI / TPM: detect PPI features by checking
availability of _DSM functions) which causes them to fail to
resume from system suspend, becuase they require the TPM hardware
to be put into the right state during resume and the TPM driver
is necessary for that.

Fix the problem by making tpm_add_ppi() return 0 when tpm_ppi_handle
is still NULL after walking the ACPI namespace in search for the PPI
_DSM, which allows the TPM driver to load and operate the hardware
(during system resume in particular), but avoid creating the PPI
sysfs group in that case.

This change is based on a prototype patch from Jiang Liu.

Fixes: dfef2bf5c1da (ACPI / TPM: detect PPI features by checking availability of _DSM functions)
References: https://bugzilla.kernel.org/show_bug.cgi?id=74021
Reported-by: James Duley <jagduley@gmail.com>
Reported-by: Phillip Dixon <phil@dixon.gen.nz>
Tested-by: Brandon Casey <drafnel@gmail.com>
Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/char/tpm/tpm_ppi.c