Lines Matching refs:ndns
16 struct nd_namespace_common *ndns = *_ndns; in __nd_detach_ndns() local
19 if (!ndns) in __nd_detach_ndns()
22 nvdimm_bus = walk_to_nvdimm_bus(&ndns->dev); in __nd_detach_ndns()
24 dev_WARN_ONCE(dev, ndns->claim != dev, "%s: invalid claim\n", __func__); in __nd_detach_ndns()
25 ndns->claim = NULL; in __nd_detach_ndns()
27 put_device(&ndns->dev); in __nd_detach_ndns()
33 struct nd_namespace_common *ndns = *_ndns; in nd_detach_ndns() local
35 if (!ndns) in nd_detach_ndns()
37 get_device(&ndns->dev); in nd_detach_ndns()
38 nvdimm_bus_lock(&ndns->dev); in nd_detach_ndns()
40 nvdimm_bus_unlock(&ndns->dev); in nd_detach_ndns()
41 put_device(&ndns->dev); in nd_detach_ndns()
77 static bool is_idle(struct device *dev, struct nd_namespace_common *ndns) in is_idle() argument
89 if (seed == dev || ndns || dev->driver) in is_idle()
139 struct nd_namespace_common *ndns; in nd_namespace_store() local
160 ndns = *_ndns; in nd_namespace_store()
164 } else if (ndns) { in nd_namespace_store()
166 dev_name(&ndns->dev)); in nd_namespace_store()
179 ndns = to_ndns(found); in nd_namespace_store()
181 switch (ndns->claim_class) { in nd_namespace_store()
209 if (__nvdimm_namespace_capacity(ndns) < SZ_16M) { in nd_namespace_store()
216 if (!__nd_attach_ndns(dev, ndns, _ndns)) { in nd_namespace_store()
218 dev_name(&ndns->dev)); in nd_namespace_store()
223 put_device(&ndns->dev); /* from device_find_child */ in nd_namespace_store()
252 static int nsio_rw_bytes(struct nd_namespace_common *ndns, in nsio_rw_bytes() argument
256 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in nsio_rw_bytes()
265 dev_WARN_ONCE(&ndns->dev, 1, "request out of range\n"); in nsio_rw_bytes()
283 cleared = nvdimm_clear_poison(&ndns->dev, in nsio_rw_bytes()
297 ret = nvdimm_flush(to_nd_region(ndns->dev.parent), NULL); in nsio_rw_bytes()
307 struct nd_namespace_common *ndns = &nsio->common; in devm_nsio_enable() local
315 dev_name(&ndns->dev))) { in devm_nsio_enable()
320 ndns->rw_bytes = nsio_rw_bytes; in devm_nsio_enable()
323 nvdimm_badblocks_populate(to_nd_region(ndns->dev.parent), &nsio->bb, in devm_nsio_enable()