Commit 6e2452df authored by Vishal Verma's avatar Vishal Verma Committed by Dan Williams

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: default avatarHaozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
Acked-by: default avatarXiao Guangrong <guangrong.xiao@linux.intel.com>
Tested-by: default avatarHaozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent fc77dbd3
...@@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc, ...@@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc,
start = ndr_desc->res->start; start = ndr_desc->res->start;
len = ndr_desc->res->end - ndr_desc->res->start + 1; 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); 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) if (rc)
goto out; 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) || if ((ars_cap->status & 0xffff) ||
!(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) { !(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
dev_warn(acpi_desc->dev, dev_warn(acpi_desc->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment