aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@intel.com>2016-03-03 17:39:41 -0500
committerDan Williams <dan.j.williams@intel.com>2016-03-04 19:46:13 -0500
commit6e2452dff4441e3dc24d415c8b2cda8a3ba52116 (patch)
treed4f99e6ee0506b19e93220f8b5031ae2e9ea3286 /drivers/acpi
parentfc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff)
nfit: Continue init even if ARS commands are unimplemented
If firmware doesn't implement any of the ARS commands, take that to mean that ARS is unsupported, and continue to initialize regions without bad block lists. We cannot make the assumption that ARS commands will be unconditionally supported on all NVDIMMs. Reported-by: Haozhong Zhang <haozhong.zhang@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Acked-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Tested-by: Haozhong Zhang <haozhong.zhang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi')
-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,
1590 start = ndr_desc->res->start; 1590 start = ndr_desc->res->start;
1591 len = ndr_desc->res->end - ndr_desc->res->start + 1; 1591 len = ndr_desc->res->end - ndr_desc->res->start + 1;
1592 1592
1593 /*
1594 * If ARS is unimplemented, unsupported, or if the 'Persistent Memory
1595 * Scrub' flag in extended status is not set, skip this but continue
1596 * initialization
1597 */
1593 rc = ars_get_cap(nd_desc, ars_cap, start, len); 1598 rc = ars_get_cap(nd_desc, ars_cap, start, len);
1599 if (rc == -ENOTTY) {
1600 dev_dbg(acpi_desc->dev,
1601 "Address Range Scrub is not implemented, won't create an error list\n");
1602 rc = 0;
1603 goto out;
1604 }
1594 if (rc) 1605 if (rc)
1595 goto out; 1606 goto out;
1596 1607
1597 /*
1598 * If ARS is unsupported, or if the 'Persistent Memory Scrub' flag in
1599 * extended status is not set, skip this but continue initialization
1600 */
1601 if ((ars_cap->status & 0xffff) || 1608 if ((ars_cap->status & 0xffff) ||
1602 !(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) { 1609 !(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
1603 dev_warn(acpi_desc->dev, 1610 dev_warn(acpi_desc->dev,