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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user