diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-05-04 20:47:22 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 00:41:39 +0200 |
commit | 9d62ed96511823fa9c2ac7a819d7b4be22a9a6de (patch) | |
tree | 960201b66f5fb6733dda4ab6b274fe6fafcf0e29 /drivers/nvdimm/dimm.c | |
parent | libnvdimm: convert NDD_ flags to use bitops, introduce NDD_LOCKED (diff) | |
download | linux-9d62ed96511823fa9c2ac7a819d7b4be22a9a6de.tar.xz linux-9d62ed96511823fa9c2ac7a819d7b4be22a9a6de.zip |
libnvdimm: handle locked label storage areas
Per the latest version of the "NVDIMM DSM Interface Example" [1], the
label data retrieval routine can report a "locked" status. In this case
all regions associated with that DIMM are disabled until the label area
is unlocked. Provide generic libnvdimm enabling for NVDIMMs with label
data area locking capabilities.
[1]: http://pmem.io/documents/
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/dimm.c')
-rw-r--r-- | drivers/nvdimm/dimm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c index ee0b412827bf..e0f0e3ce1a32 100644 --- a/drivers/nvdimm/dimm.c +++ b/drivers/nvdimm/dimm.c @@ -49,6 +49,8 @@ static int nvdimm_probe(struct device *dev) kref_init(&ndd->kref); rc = nvdimm_init_nsarea(ndd); + if (rc == -EACCES) + nvdimm_set_locked(dev); if (rc) goto err; |