Lines Matching refs:ndns
22 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release()
100 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show()
101 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show()
114 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store()
184 struct nd_namespace_common *ndns) in __nd_btt_create() argument
209 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create()
210 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create()
211 dev_name(ndns->claim)); in __nd_btt_create()
247 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid()
271 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, in nd_btt_version() argument
274 if (ndns->claim_class == NVDIMM_CCLASS_BTT2) { in nd_btt_version()
279 if (nvdimm_read_bytes(ndns, 0, btt_sb, sizeof(*btt_sb), 0)) in nd_btt_version()
294 if (nvdimm_read_bytes(ndns, SZ_4K, btt_sb, sizeof(*btt_sb), 0)) in nd_btt_version()
307 struct nd_namespace_common *ndns, struct btt_sb *btt_sb) in __nd_btt_probe() argument
311 if (!btt_sb || !ndns || !nd_btt) in __nd_btt_probe()
314 if (nvdimm_namespace_capacity(ndns) < SZ_16M) in __nd_btt_probe()
317 rc = nd_btt_version(nd_btt, ndns, btt_sb); in __nd_btt_probe()
331 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_btt_probe() argument
336 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_btt_probe()
338 if (ndns->force_raw) in nd_btt_probe()
341 switch (ndns->claim_class) { in nd_btt_probe()
350 nvdimm_bus_lock(&ndns->dev); in nd_btt_probe()
351 btt_dev = __nd_btt_create(nd_region, 0, NULL, ndns); in nd_btt_probe()
352 nvdimm_bus_unlock(&ndns->dev); in nd_btt_probe()
356 rc = __nd_btt_probe(to_nd_btt(btt_dev), ndns, btt_sb); in nd_btt_probe()
361 nd_detach_ndns(btt_dev, &nd_btt->ndns); in nd_btt_probe()