summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/nfit/nfit.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-03-28 10:44:50 -0700
committerDan Williams <dan.j.williams@intel.com>2018-03-28 10:44:50 -0700
commit466d1493ea830789a2f063f478aaed2e324f0d3d (patch)
treefef630bbda879a29999e7b92d572b372d421c148 /drivers/acpi/nfit/nfit.h
parent0731de476a37c33485af82d64041c9d193208df8 (diff)
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: 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>
Diffstat (limited to 'drivers/acpi/nfit/nfit.h')
-rw-r--r--drivers/acpi/nfit/nfit.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
index 50d36e166d70..ac9c49463731 100644
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
@@ -171,9 +171,8 @@ struct nfit_mem {
struct resource *flush_wpq;
unsigned long dsm_mask;
int family;
- u32 has_lsi:1;
- u32 has_lsr:1;
- u32 has_lsw:1;
+ bool has_lsr;
+ bool has_lsw;
};
struct acpi_nfit_desc {