Lines Matching refs:ndns
21 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release()
99 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show()
100 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show()
113 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store()
185 struct nd_namespace_common *ndns) in __nd_btt_create() argument
211 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create()
212 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create()
213 dev_name(ndns->claim)); in __nd_btt_create()
249 const uuid_t *ns_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid()
275 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, in nd_btt_version() argument
278 if (ndns->claim_class == NVDIMM_CCLASS_BTT2) { in nd_btt_version()
283 if (nvdimm_read_bytes(ndns, 0, btt_sb, sizeof(*btt_sb), 0)) in nd_btt_version()
298 if (nvdimm_read_bytes(ndns, SZ_4K, btt_sb, sizeof(*btt_sb), 0)) in nd_btt_version()
311 struct nd_namespace_common *ndns, struct btt_sb *btt_sb) in __nd_btt_probe() argument
315 if (!btt_sb || !ndns || !nd_btt) in __nd_btt_probe()
318 if (nvdimm_namespace_capacity(ndns) < SZ_16M) in __nd_btt_probe()
321 rc = nd_btt_version(nd_btt, ndns, btt_sb); in __nd_btt_probe()
335 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_btt_probe() argument
340 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_btt_probe()
342 if (ndns->force_raw) in nd_btt_probe()
345 switch (ndns->claim_class) { in nd_btt_probe()
354 nvdimm_bus_lock(&ndns->dev); in nd_btt_probe()
355 btt_dev = __nd_btt_create(nd_region, 0, NULL, ndns); in nd_btt_probe()
356 nvdimm_bus_unlock(&ndns->dev); in nd_btt_probe()
360 rc = __nd_btt_probe(to_nd_btt(btt_dev), ndns, btt_sb); in nd_btt_probe()
365 nd_detach_ndns(btt_dev, &nd_btt->ndns); in nd_btt_probe()