]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:50:00 +0000 (11:50 -0400)
commit4cd008f03b75362761a6587bdfae95d7eaea748f
treec8c2d91c289264c38e35ed2fb3aab9237e161253
parent86ab511d2e5a3b91807c6ac03c90227021694630
acpi, nfit: rework NVDIMM leaf method detection

BugLink: http://bugs.launchpad.net/bugs/1773233
commit 466d1493ea830789a2f063f478aaed2e324f0d3d upstream.

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: 4b27db7e26cd ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/acpi/nfit/core.c
drivers/acpi/nfit/nfit.h