]> git.baikalelectronics.ru Git - kernel.git/commit
acpi, nfit: rework NVDIMM leaf method detection
authorDan Williams <dan.j.williams@intel.com>
Wed, 28 Mar 2018 17:44:50 +0000 (10:44 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 28 Mar 2018 17:44:50 +0000 (10:44 -0700)
commitfb335871890c7e1f600c29614ab8c929d63a744e
treefef630bbda879a29999e7b92d572b372d421c148
parent8e44c5608b29e542e1f6babb94ad495708978c30
acpi, nfit: rework NVDIMM leaf method detection

Some BIOSen do not handle 0-byte transfer lengths for the _LSR and _LSW
(label storage read/write) methods. This causes Linux to fallback to the
deprecated _DSM path, or otherwise disable label support.

Introduce acpi_nvdimm_has_method() to detect whether a method is
available rather than calling the method, require _LSI and _LSR to be
paired, and require read support before enabling write support.

Cc: <stable@vger.kernel.org>
Fixes: a1d2fbe9c6e0 ("acpi, nfit: add support for the _LS...")
Suggested-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c
drivers/acpi/nfit/nfit.h