summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-04 18:47:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-04 18:47:18 -0800
commita7c9b603cf2371edacb054abc35597e810c1e5fd (patch)
treeddbe118327a9ce3630bee14d7f69226eee9b6b14 /drivers
parentc12f83c3099c4dd73fe721409d2ce18ca79a753d (diff)
parent6e2452dff4441e3dc24d415c8b2cda8a3ba52116 (diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvcimm fix from Dan Williams: "One straggling fix for NVDIMM support. The KVM/QEMU enabling for NVDIMMs has recently reached the point where it is able to accept some ACPI _DSM requests from a guest VM. However they immediately found that the 4.5-rc kernel is unusable because the kernel's 'nfit' driver fails to load upon seeing a valid "not supported" response from the virtual BIOS for an address range scrub command. It is not mandatory that a platform implement address range scrubbing, so this fix from Vishal properly treats the 'not supported' response as 'skip scrubbing and continue loading the driver'" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nfit: Continue init even if ARS commands are unimplemented
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/nfit.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index fb53db187854..35947ac87644 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc,
start = ndr_desc->res->start;
len = ndr_desc->res->end - ndr_desc->res->start + 1;
+ /*
+ * If ARS is unimplemented, unsupported, or if the 'Persistent Memory
+ * Scrub' flag in extended status is not set, skip this but continue
+ * initialization
+ */
rc = ars_get_cap(nd_desc, ars_cap, start, len);
+ if (rc == -ENOTTY) {
+ dev_dbg(acpi_desc->dev,
+ "Address Range Scrub is not implemented, won't create an error list\n");
+ rc = 0;
+ goto out;
+ }
if (rc)
goto out;
- /*
- * If ARS is unsupported, or if the 'Persistent Memory Scrub' flag in
- * extended status is not set, skip this but continue initialization
- */
if ((ars_cap->status & 0xffff) ||
!(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
dev_warn(acpi_desc->dev,