Lines Matching refs:p2p_dev
454 struct pci_dev *p2p_dev; in nvmet_p2pmem_ns_enable() local
470 if (ns->p2p_dev) { in nvmet_p2pmem_ns_enable()
471 ret = pci_p2pdma_distance(ns->p2p_dev, nvmet_ns_dev(ns), true); in nvmet_p2pmem_ns_enable()
482 p2p_dev = pci_p2pmem_find(nvmet_ns_dev(ns)); in nvmet_p2pmem_ns_enable()
483 if (!p2p_dev) { in nvmet_p2pmem_ns_enable()
489 pci_dev_put(p2p_dev); in nvmet_p2pmem_ns_enable()
502 struct pci_dev *p2p_dev; in nvmet_p2pmem_ns_add_p2p() local
508 if (ns->p2p_dev) { in nvmet_p2pmem_ns_add_p2p()
509 ret = pci_p2pdma_distance(ns->p2p_dev, ctrl->p2p_client, true); in nvmet_p2pmem_ns_add_p2p()
513 p2p_dev = pci_dev_get(ns->p2p_dev); in nvmet_p2pmem_ns_add_p2p()
518 p2p_dev = pci_p2pmem_find_many(clients, ARRAY_SIZE(clients)); in nvmet_p2pmem_ns_add_p2p()
519 if (!p2p_dev) { in nvmet_p2pmem_ns_add_p2p()
526 ret = radix_tree_insert(&ctrl->p2p_ns_map, ns->nsid, p2p_dev); in nvmet_p2pmem_ns_add_p2p()
528 pci_dev_put(p2p_dev); in nvmet_p2pmem_ns_add_p2p()
530 pr_info("using p2pmem on %s for nsid %d\n", pci_name(p2p_dev), in nvmet_p2pmem_ns_add_p2p()
1008 static int nvmet_req_alloc_p2pmem_sgls(struct pci_dev *p2p_dev, in nvmet_req_alloc_p2pmem_sgls() argument
1011 req->sg = pci_p2pmem_alloc_sgl(p2p_dev, &req->sg_cnt, in nvmet_req_alloc_p2pmem_sgls()
1017 req->metadata_sg = pci_p2pmem_alloc_sgl(p2p_dev, in nvmet_req_alloc_p2pmem_sgls()
1023 req->p2p_dev = p2p_dev; in nvmet_req_alloc_p2pmem_sgls()
1027 pci_p2pmem_free_sgl(req->p2p_dev, req->sg); in nvmet_req_alloc_p2pmem_sgls()
1042 struct pci_dev *p2p_dev = nvmet_req_find_p2p_dev(req); in nvmet_req_alloc_sgls() local
1044 if (p2p_dev && !nvmet_req_alloc_p2pmem_sgls(p2p_dev, req)) in nvmet_req_alloc_sgls()
1069 if (req->p2p_dev) { in nvmet_req_free_sgls()
1070 pci_p2pmem_free_sgl(req->p2p_dev, req->sg); in nvmet_req_free_sgls()
1072 pci_p2pmem_free_sgl(req->p2p_dev, req->metadata_sg); in nvmet_req_free_sgls()
1073 req->p2p_dev = NULL; in nvmet_req_free_sgls()