Home
last modified time | relevance | path

Searched refs:ctrlr (Results 1 – 8 of 8) sorted by relevance

/haiku/src/add-ons/kernel/drivers/disk/nvme/libnvme/
H A Dnvme_ctrlr.c41 nvme_ctrlr_get_ready_to_in_ms(struct nvme_ctrlr *ctrlr) in nvme_ctrlr_get_ready_to_in_ms() argument
48 cap.raw = nvme_reg_mmio_read_8(ctrlr, cap.raw); in nvme_ctrlr_get_ready_to_in_ms()
56 static int nvme_ctrlr_create_qpair(struct nvme_ctrlr *ctrlr, in nvme_ctrlr_create_qpair() argument
62 ret = nvme_admin_create_ioq(ctrlr, qpair, NVME_IO_COMPLETION_QUEUE); in nvme_ctrlr_create_qpair()
70 ret = nvme_admin_create_ioq(ctrlr, qpair, NVME_IO_SUBMISSION_QUEUE); in nvme_ctrlr_create_qpair()
75 nvme_admin_delete_ioq(ctrlr, qpair, NVME_IO_COMPLETION_QUEUE); in nvme_ctrlr_create_qpair()
87 static int nvme_ctrlr_delete_qpair(struct nvme_ctrlr *ctrlr, in nvme_ctrlr_delete_qpair() argument
93 ret = nvme_admin_delete_ioq(ctrlr, qpair, NVME_IO_SUBMISSION_QUEUE); in nvme_ctrlr_delete_qpair()
101 ret = nvme_admin_delete_ioq(ctrlr, qpair, NVME_IO_COMPLETION_QUEUE); in nvme_ctrlr_delete_qpair()
115 nvme_ctrlr_construct_intel_support_log_page_list(struct nvme_ctrlr *ctrlr, in nvme_ctrlr_construct_intel_support_log_page_list() argument
[all …]
H A Dnvme.c45 static struct nvme_ctrlr *nvme_ctrlr_get(struct nvme_ctrlr *ctrlr, in nvme_ctrlr_get() argument
53 if (c == ctrlr) { in nvme_ctrlr_get()
60 ctrlr = NULL; in nvme_ctrlr_get()
65 return ctrlr; in nvme_ctrlr_get()
175 struct nvme_ctrlr *ctrlr; in nvme_ctrlr_open() local
197 LIST_FOREACH(ctrlr, &ctrlr_head, link) { in nvme_ctrlr_open()
198 if (nvme_pci_dev_cmp(ctrlr->pci_dev, pdev) == 0) { in nvme_ctrlr_open()
200 ctrlr = NULL; in nvme_ctrlr_open()
206 ctrlr = nvme_ctrlr_attach(pdev, opts); in nvme_ctrlr_open()
207 if (!ctrlr) { in nvme_ctrlr_open()
[all …]
H A Dnvme_admin.c40 static int nvme_admin_submit_cmd(struct nvme_ctrlr *ctrlr, in nvme_admin_submit_cmd() argument
48 req = nvme_request_allocate_contig(&ctrlr->adminq, buf, len, in nvme_admin_submit_cmd()
51 req = nvme_request_allocate_null(&ctrlr->adminq, cb_fn, cb_arg); in nvme_admin_submit_cmd()
57 return nvme_qpair_submit_request(&ctrlr->adminq, req); in nvme_admin_submit_cmd()
64 static int nvme_admin_wait_cmd(struct nvme_ctrlr *ctrlr, in nvme_admin_wait_cmd() argument
70 nvme_qpair_poll(&ctrlr->adminq, 0); in nvme_admin_wait_cmd()
83 static int nvme_admin_exec_cmd(struct nvme_ctrlr *ctrlr, in nvme_admin_exec_cmd() argument
92 ret = nvme_admin_submit_cmd(ctrlr, cmd, buf, len, in nvme_admin_exec_cmd()
99 return nvme_admin_wait_cmd(ctrlr, &status); in nvme_admin_exec_cmd()
105 int nvme_admin_identify_ctrlr(struct nvme_ctrlr *ctrlr, in nvme_admin_identify_ctrlr() argument
[all …]
H A Dnvme_ns.c38 return &ns->ctrlr->nsdata[ns->id - 1]; in nvme_ns_get_data()
43 struct nvme_ctrlr *ctrlr = ns->ctrlr; in nvme_ns_identify_update() local
48 ret = nvme_admin_identify_ns(ctrlr, ns->id, nsdata); in nvme_ns_identify_update()
57 ns->sectors_per_max_io = ctrlr->max_xfer_size / sector_size; in nvme_ns_identify_update()
62 if (ctrlr->cdata.oncs.dsm) in nvme_ns_identify_update()
65 if (ctrlr->cdata.vwc.present) in nvme_ns_identify_update()
68 if (ctrlr->cdata.oncs.write_zeroes) in nvme_ns_identify_update()
90 int nvme_ns_construct(struct nvme_ctrlr *ctrlr, struct nvme_ns *ns, in nvme_ns_construct() argument
95 ns->ctrlr = ctrlr; in nvme_ns_construct()
99 nvme_pcicfg_read32(ctrlr->pci_dev, &pci_devid, 0); in nvme_ns_construct()
[all …]
H A Dnvme_internal.h304 struct nvme_ctrlr *ctrlr; member
398 struct nvme_ctrlr *ctrlr; member
409 struct nvme_ctrlr *ctrlr; member
621 extern int nvme_admin_identify_ctrlr(struct nvme_ctrlr *ctrlr,
624 extern int nvme_admin_get_feature(struct nvme_ctrlr *ctrlr,
629 extern int nvme_admin_set_feature(struct nvme_ctrlr *ctrlr,
635 extern int nvme_admin_format_nvm(struct nvme_ctrlr *ctrlr,
639 extern int nvme_admin_get_log_page(struct nvme_ctrlr *ctrlr,
643 extern int nvme_admin_abort_cmd(struct nvme_ctrlr *ctrlr,
646 extern int nvme_admin_create_ioq(struct nvme_ctrlr *ctrlr,
[all …]
H A Dnvme.h557 extern int nvme_ctrlr_close(struct nvme_ctrlr *ctrlr);
567 extern int nvme_ctrlr_stat(struct nvme_ctrlr *ctrlr,
581 extern int nvme_ctrlr_data(struct nvme_ctrlr *ctrlr,
601 extern int nvme_ctrlr_get_feature(struct nvme_ctrlr *ctrlr,
623 extern int nvme_ctrlr_set_feature(struct nvme_ctrlr *ctrlr,
637 extern int nvme_ctrlr_attach_ns(struct nvme_ctrlr *ctrlr, unsigned int nsid,
649 extern int nvme_ctrlr_detach_ns(struct nvme_ctrlr *ctrlr, unsigned int nsid,
660 extern unsigned int nvme_ctrlr_create_ns(struct nvme_ctrlr *ctrlr,
671 extern int nvme_ctrlr_delete_ns(struct nvme_ctrlr *ctrlr, unsigned int nsid);
686 extern int nvme_ctrlr_format_ns(struct nvme_ctrlr *ctrlr,
[all …]
H A Dnvme_qpair.c427 while (!qpair->ctrlr->resetting && LIST_FIRST(&qpair->free_tr) in nvme_qpair_submit_queued_requests()
783 qpair->ctrlr->enabled_io_qpairs++; in _nvme_qpair_io_qpair_enable()
814 qpair->ctrlr->enabled_io_qpairs--; in _nvme_qpair_io_qpair_disable()
821 static int nvme_ctrlr_reserve_sq_in_cmb(struct nvme_ctrlr *ctrlr, in nvme_ctrlr_reserve_sq_in_cmb() argument
828 round_offset = ctrlr->cmb_current_offset; in nvme_ctrlr_reserve_sq_in_cmb()
831 if (round_offset + length > ctrlr->cmb_size) in nvme_ctrlr_reserve_sq_in_cmb()
835 ctrlr->cmb_current_offset = round_offset + length; in nvme_ctrlr_reserve_sq_in_cmb()
843 int nvme_qpair_construct(struct nvme_ctrlr *ctrlr, struct nvme_qpair *qpair, in nvme_qpair_construct() argument
863 qpair->ctrlr = ctrlr; in nvme_qpair_construct()
865 if (ctrlr->opts.use_cmb_sqs) { in nvme_qpair_construct()
[all …]
/haiku/src/add-ons/kernel/drivers/disk/nvme/
H A Dnvme_disk.cpp83 struct nvme_ctrlr* ctrlr; member
158 ASSERT(info->ctrlr == NULL); in nvme_disk_init_device()
188 info->ctrlr = nvme_ctrlr_open(device, NULL); in nvme_disk_init_device()
189 if (info->ctrlr == NULL) { in nvme_disk_init_device()
195 int err = nvme_ctrlr_stat(info->ctrlr, &cstat); in nvme_disk_init_device()
198 nvme_ctrlr_close(info->ctrlr); in nvme_disk_init_device()
207 info->ns = nvme_ns_open(info->ctrlr, cstat.ns_ids[0]); in nvme_disk_init_device()
210 nvme_ctrlr_close(info->ctrlr); in nvme_disk_init_device()
219 nvme_ctrlr_close(info->ctrlr); in nvme_disk_init_device()
262 if (info->ctrlr->feature_supported[NVME_FEAT_INTERRUPT_COALESCING]) { in nvme_disk_init_device()
[all …]