Lines Matching defs:n
452 static NvmeFdpEvent *nvme_fdp_alloc_event(NvmeCtrl *n, NvmeFdpEventBuffer *ebuf) in nvme_fdp_alloc_event()
478 static bool nvme_update_ruh(NvmeCtrl *n, NvmeNamespace *ns, uint16_t pid) in nvme_update_ruh()
515 static bool nvme_addr_is_cmb(NvmeCtrl *n, hwaddr addr) in nvme_addr_is_cmb()
529 static inline void *nvme_addr_to_cmb(NvmeCtrl *n, hwaddr addr) in nvme_addr_to_cmb()
535 static bool nvme_addr_is_pmr(NvmeCtrl *n, hwaddr addr) in nvme_addr_is_pmr()
548 static inline void *nvme_addr_to_pmr(NvmeCtrl *n, hwaddr addr) in nvme_addr_to_pmr()
553 static inline bool nvme_addr_is_iomem(NvmeCtrl *n, hwaddr addr) in nvme_addr_is_iomem()
571 static int nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size) in nvme_addr_read()
591 static int nvme_addr_write(NvmeCtrl *n, hwaddr addr, const void *buf, int size) in nvme_addr_write()
611 static bool nvme_nsid_valid(NvmeCtrl *n, uint32_t nsid) in nvme_nsid_valid()
617 static int nvme_check_sqid(NvmeCtrl *n, uint16_t sqid) in nvme_check_sqid()
622 static int nvme_check_cqid(NvmeCtrl *n, uint16_t cqid) in nvme_check_cqid()
651 static void nvme_irq_check(NvmeCtrl *n) in nvme_irq_check()
672 static void nvme_irq_assert(NvmeCtrl *n, NvmeCQueue *cq) in nvme_irq_assert()
691 static void nvme_irq_deassert(NvmeCtrl *n, NvmeCQueue *cq) in nvme_irq_deassert()
715 static inline void nvme_sg_init(NvmeCtrl *n, NvmeSg *sg, bool dma) in nvme_sg_init()
793 static uint16_t nvme_map_addr_cmb(NvmeCtrl *n, QEMUIOVector *iov, hwaddr addr, in nvme_map_addr_cmb()
811 static uint16_t nvme_map_addr_pmr(NvmeCtrl *n, QEMUIOVector *iov, hwaddr addr, in nvme_map_addr_pmr()
827 static uint16_t nvme_map_addr(NvmeCtrl *n, NvmeSg *sg, hwaddr addr, size_t len) in nvme_map_addr()
881 static inline bool nvme_addr_is_dma(NvmeCtrl *n, hwaddr addr) in nvme_addr_is_dma()
886 static uint16_t nvme_map_prp(NvmeCtrl *n, NvmeSg *sg, uint64_t prp1, in nvme_map_prp()
987 static uint16_t nvme_map_sgl_data(NvmeCtrl *n, NvmeSg *sg, in nvme_map_sgl_data()
1048 static uint16_t nvme_map_sgl(NvmeCtrl *n, NvmeSg *sg, NvmeSglDescriptor sgl, in nvme_map_sgl()
1185 uint16_t nvme_map_dptr(NvmeCtrl *n, NvmeSg *sg, size_t len, in nvme_map_dptr()
1204 static uint16_t nvme_map_mptr(NvmeCtrl *n, NvmeSg *sg, size_t len, in nvme_map_mptr()
1235 static uint16_t nvme_map_data(NvmeCtrl *n, uint32_t nlb, NvmeRequest *req) in nvme_map_data()
1265 static uint16_t nvme_map_mdata(NvmeCtrl *n, uint32_t nlb, NvmeRequest *req) in nvme_map_mdata()
1291 static uint16_t nvme_tx_interleaved(NvmeCtrl *n, NvmeSg *sg, uint8_t *ptr, in nvme_tx_interleaved()
1353 static uint16_t nvme_tx(NvmeCtrl *n, NvmeSg *sg, void *ptr, uint32_t len, in nvme_tx()
1390 static inline uint16_t nvme_c2h(NvmeCtrl *n, void *ptr, uint32_t len, in nvme_c2h()
1403 static inline uint16_t nvme_h2c(NvmeCtrl *n, void *ptr, uint32_t len, in nvme_h2c()
1416 uint16_t nvme_bounce_data(NvmeCtrl *n, void *ptr, uint32_t len, in nvme_bounce_data()
1433 uint16_t nvme_bounce_mdata(NvmeCtrl *n, void *ptr, uint32_t len, in nvme_bounce_mdata()
1499 NvmeCtrl *n = cq->ctrl; in nvme_post_cqes() local
1572 NvmeCtrl *n = opaque; in nvme_process_aers() local
1614 static void nvme_enqueue_event(NvmeCtrl *n, uint8_t event_type, in nvme_enqueue_event()
1639 static void nvme_smart_event(NvmeCtrl *n, uint8_t event) in nvme_smart_event()
1668 static void nvme_clear_events(NvmeCtrl *n, uint8_t event_type) in nvme_clear_events()
1683 static inline uint16_t nvme_check_mdts(NvmeCtrl *n, size_t len) in nvme_check_mdts()
1998 static uint16_t nvme_zrm_open_flags(NvmeCtrl *n, NvmeNamespace *ns, in nvme_zrm_open_flags()
2056 static inline uint16_t nvme_zrm_auto(NvmeCtrl *n, NvmeNamespace *ns, in nvme_zrm_auto()
2340 NvmeCtrl *n = nvme_ctrl(req); in nvme_compare_mdata_cb() local
2431 NvmeCtrl *n = nvme_ctrl(req); in nvme_compare_data_cb() local
2576 NvmeCtrl *n = nvme_ctrl(req); in nvme_dsm_cb() local
2623 static uint16_t nvme_dsm(NvmeCtrl *n, NvmeRequest *req) in nvme_dsm()
2661 static uint16_t nvme_verify(NvmeCtrl *n, NvmeRequest *req) in nvme_verify()
2729 NvmeCtrl *n; member
3322 static uint16_t nvme_copy(NvmeCtrl *n, NvmeRequest *req) in nvme_copy()
3412 static uint16_t nvme_compare(NvmeCtrl *n, NvmeRequest *req) in nvme_compare()
3536 NvmeCtrl *n = nvme_ctrl(req); in nvme_do_flush() local
3565 static uint16_t nvme_flush(NvmeCtrl *n, NvmeRequest *req) in nvme_flush()
3605 static uint16_t nvme_read(NvmeCtrl *n, NvmeRequest *req) in nvme_read()
3678 static void nvme_do_write_fdp(NvmeCtrl *n, NvmeRequest *req, uint64_t slba, in nvme_do_write_fdp()
3713 static uint16_t nvme_do_write(NvmeCtrl *n, NvmeRequest *req, bool append, in nvme_do_write()
3854 static inline uint16_t nvme_write(NvmeCtrl *n, NvmeRequest *req) in nvme_write()
3859 static inline uint16_t nvme_write_zeroes(NvmeCtrl *n, NvmeRequest *req) in nvme_write_zeroes()
3864 static inline uint16_t nvme_zone_append(NvmeCtrl *n, NvmeRequest *req) in nvme_zone_append()
4186 static uint16_t nvme_zone_mgmt_send_zrwa_flush(NvmeCtrl *n, NvmeZone *zone, in nvme_zone_mgmt_send_zrwa_flush()
4224 static uint16_t nvme_zone_mgmt_send(NvmeCtrl *n, NvmeRequest *req) in nvme_zone_mgmt_send()
4374 static uint16_t nvme_zone_mgmt_recv(NvmeCtrl *n, NvmeRequest *req) in nvme_zone_mgmt_recv()
4481 static uint16_t nvme_io_mgmt_recv_ruhs(NvmeCtrl *n, NvmeRequest *req, in nvme_io_mgmt_recv_ruhs()
4536 static uint16_t nvme_io_mgmt_recv(NvmeCtrl *n, NvmeRequest *req) in nvme_io_mgmt_recv()
4554 static uint16_t nvme_io_mgmt_send_ruh_update(NvmeCtrl *n, NvmeRequest *req) in nvme_io_mgmt_send_ruh_update()
4591 static uint16_t nvme_io_mgmt_send(NvmeCtrl *n, NvmeRequest *req) in nvme_io_mgmt_send()
4607 static uint16_t __nvme_io_cmd_nvm(NvmeCtrl *n, NvmeRequest *req) in __nvme_io_cmd_nvm()
4633 static uint16_t nvme_io_cmd_nvm(NvmeCtrl *n, NvmeRequest *req) in nvme_io_cmd_nvm()
4643 static uint16_t nvme_io_cmd_zoned(NvmeCtrl *n, NvmeRequest *req) in nvme_io_cmd_zoned()
4662 static uint16_t nvme_io_cmd(NvmeCtrl *n, NvmeRequest *req) in nvme_io_cmd()
4726 NvmeCtrl *n = cq->ctrl; in nvme_cq_notifier() local
4747 NvmeCtrl *n = cq->ctrl; in nvme_init_cq_ioeventfd() local
4776 NvmeCtrl *n = sq->ctrl; in nvme_init_sq_ioeventfd() local
4792 static void nvme_free_sq(NvmeSQueue *sq, NvmeCtrl *n) in nvme_free_sq()
4810 static uint16_t nvme_del_sq(NvmeCtrl *n, NvmeRequest *req) in nvme_del_sq()
4852 static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n, uint64_t dma_addr, in nvme_init_sq()
4893 static uint16_t nvme_create_sq(NvmeCtrl *n, NvmeRequest *req) in nvme_create_sq()
4948 static uint16_t nvme_ocp_extended_smart_info(NvmeCtrl *n, uint8_t rae, in nvme_ocp_extended_smart_info()
4987 static uint16_t nvme_smart_info(NvmeCtrl *n, uint8_t rae, uint32_t buf_len, in nvme_smart_info()
5049 static uint16_t nvme_endgrp_info(NvmeCtrl *n, uint8_t rae, uint32_t buf_len, in nvme_endgrp_info()
5091 static uint16_t nvme_fw_log_info(NvmeCtrl *n, uint32_t buf_len, uint64_t off, in nvme_fw_log_info()
5109 static uint16_t nvme_error_info(NvmeCtrl *n, uint8_t rae, uint32_t buf_len, in nvme_error_info()
5129 static uint16_t nvme_changed_nslist(NvmeCtrl *n, uint8_t rae, uint32_t buf_len, in nvme_changed_nslist()
5175 static uint16_t nvme_cmd_effects(NvmeCtrl *n, uint8_t csi, uint32_t buf_len, in nvme_cmd_effects()
5216 static uint16_t nvme_vendor_specific_log(NvmeCtrl *n, uint8_t rae, in nvme_vendor_specific_log()
5240 static uint16_t nvme_fdp_confs(NvmeCtrl *n, uint32_t endgrpid, uint32_t buf_len, in nvme_fdp_confs()
5309 static uint16_t nvme_fdp_ruh_usage(NvmeCtrl *n, uint32_t endgrpid, in nvme_fdp_ruh_usage()
5354 static uint16_t nvme_fdp_stats(NvmeCtrl *n, uint32_t endgrpid, uint32_t buf_len, in nvme_fdp_stats()
5385 static uint16_t nvme_fdp_events(NvmeCtrl *n, uint32_t endgrpid, in nvme_fdp_events()
5439 static uint16_t nvme_get_log(NvmeCtrl *n, NvmeRequest *req) in nvme_get_log()
5505 static void nvme_free_cq(NvmeCQueue *cq, NvmeCtrl *n) in nvme_free_cq()
5526 static uint16_t nvme_del_cq(NvmeCtrl *n, NvmeRequest *req) in nvme_del_cq()
5553 static void nvme_init_cq(NvmeCQueue *cq, NvmeCtrl *n, uint64_t dma_addr, in nvme_init_cq()
5588 static uint16_t nvme_create_cq(NvmeCtrl *n, NvmeRequest *req) in nvme_create_cq()
5647 static uint16_t nvme_rpt_empty_id_struct(NvmeCtrl *n, NvmeRequest *req) in nvme_rpt_empty_id_struct()
5654 static uint16_t nvme_identify_ctrl(NvmeCtrl *n, NvmeRequest *req) in nvme_identify_ctrl()
5661 static uint16_t nvme_identify_ctrl_csi(NvmeCtrl *n, NvmeRequest *req) in nvme_identify_ctrl_csi()
5688 static uint16_t nvme_identify_ns(NvmeCtrl *n, NvmeRequest *req, bool active) in nvme_identify_ns()
5719 static uint16_t nvme_identify_ctrl_list(NvmeCtrl *n, NvmeRequest *req, in nvme_identify_ctrl_list()
5766 static uint16_t nvme_identify_pri_ctrl_cap(NvmeCtrl *n, NvmeRequest *req) in nvme_identify_pri_ctrl_cap()
5774 static uint16_t nvme_identify_sec_ctrl_list(NvmeCtrl *n, NvmeRequest *req) in nvme_identify_sec_ctrl_list()
5797 static uint16_t nvme_identify_ns_ind(NvmeCtrl *n, NvmeRequest *req, bool alloc) in nvme_identify_ns_ind()
5824 static uint16_t nvme_identify_ns_csi(NvmeCtrl *n, NvmeRequest *req, in nvme_identify_ns_csi()
5860 static uint16_t nvme_identify_nslist(NvmeCtrl *n, NvmeRequest *req, in nvme_identify_nslist()
5907 static uint16_t nvme_identify_nslist_csi(NvmeCtrl *n, NvmeRequest *req, in nvme_identify_nslist_csi()
5955 static uint16_t nvme_endurance_group_list(NvmeCtrl *n, NvmeRequest *req) in nvme_endurance_group_list()
5975 static uint16_t nvme_identify_ns_descr_list(NvmeCtrl *n, NvmeRequest *req) in nvme_identify_ns_descr_list()
6043 static uint16_t nvme_identify_cmd_set(NvmeCtrl *n, NvmeRequest *req) in nvme_identify_cmd_set()
6056 static uint16_t nvme_identify(NvmeCtrl *n, NvmeRequest *req) in nvme_identify()
6108 static uint16_t nvme_abort(NvmeCtrl *n, NvmeRequest *req) in nvme_abort()
6149 static inline void nvme_set_timestamp(NvmeCtrl *n, uint64_t ts) in nvme_set_timestamp()
6157 static inline uint64_t nvme_get_timestamp(const NvmeCtrl *n) in nvme_get_timestamp()
6184 static uint16_t nvme_get_feature_timestamp(NvmeCtrl *n, NvmeRequest *req) in nvme_get_feature_timestamp()
6191 static int nvme_get_feature_fdp(NvmeCtrl *n, uint32_t endgrpid, in nvme_get_feature_fdp()
6206 static uint16_t nvme_get_feature_fdp_events(NvmeCtrl *n, NvmeNamespace *ns, in nvme_get_feature_fdp_events()
6269 static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeRequest *req) in nvme_get_feature()
6465 static uint16_t nvme_set_feature_timestamp(NvmeCtrl *n, NvmeRequest *req) in nvme_set_feature_timestamp()
6480 static uint16_t nvme_set_feature_fdp_events(NvmeCtrl *n, NvmeNamespace *ns, in nvme_set_feature_fdp_events()
6525 static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req) in nvme_set_feature()
6713 static uint16_t nvme_aer(NvmeCtrl *n, NvmeRequest *req) in nvme_aer()
6732 static void nvme_update_dsm_limits(NvmeCtrl *n, NvmeNamespace *ns) in nvme_update_dsm_limits()
6752 static bool nvme_csi_supported(NvmeCtrl *n, uint8_t csi) in nvme_csi_supported()
6769 static void nvme_detach_ns(NvmeCtrl *n, NvmeNamespace *ns) in nvme_detach_ns()
6777 static uint16_t nvme_ns_attachment(NvmeCtrl *n, NvmeRequest *req) in nvme_ns_attachment()
6969 NvmeCtrl *n = nvme_ctrl(req); in nvme_do_format() local
7009 static uint16_t nvme_format(NvmeCtrl *n, NvmeRequest *req) in nvme_format()
7062 static void nvme_get_virt_res_num(NvmeCtrl *n, uint8_t rt, int *num_total, in nvme_get_virt_res_num()
7072 static uint16_t nvme_assign_virt_res_to_prim(NvmeCtrl *n, NvmeRequest *req, in nvme_assign_virt_res_to_prim()
7102 static void nvme_update_virt_res(NvmeCtrl *n, NvmeSecCtrlEntry *sctrl, in nvme_update_virt_res()
7120 static uint16_t nvme_assign_virt_res_to_sec(NvmeCtrl *n, NvmeRequest *req, in nvme_assign_virt_res_to_sec()
7154 static uint16_t nvme_virt_set_state(NvmeCtrl *n, uint16_t cntlid, bool online) in nvme_virt_set_state()
7195 static uint16_t nvme_virt_mngmt(NvmeCtrl *n, NvmeRequest *req) in nvme_virt_mngmt()
7224 static uint16_t nvme_dbbuf_config(NvmeCtrl *n, const NvmeRequest *req) in nvme_dbbuf_config()
7281 static uint16_t nvme_directive_send(NvmeCtrl *n, NvmeRequest *req) in nvme_directive_send()
7286 static uint16_t nvme_directive_receive(NvmeCtrl *n, NvmeRequest *req) in nvme_directive_receive()
7336 static uint16_t nvme_admin_cmd(NvmeCtrl *n, NvmeRequest *req) in nvme_admin_cmd()
7415 static int nvme_atomic_write_check(NvmeCtrl *n, NvmeCmd *cmd, in nvme_atomic_write_check()
7478 static NvmeAtomic *nvme_get_atomic(NvmeCtrl *n, NvmeCmd *cmd) in nvme_get_atomic()
7489 NvmeCtrl *n = sq->ctrl; in nvme_process_sq() local
7574 static void nvme_activate_virt_res(NvmeCtrl *n) in nvme_activate_virt_res()
7597 static void nvme_ctrl_reset(NvmeCtrl *n, NvmeResetType rst) in nvme_ctrl_reset()
7669 static void nvme_ctrl_shutdown(NvmeCtrl *n) in nvme_ctrl_shutdown()
7688 static int nvme_start_ctrl(NvmeCtrl *n) in nvme_start_ctrl()
7774 static void nvme_cmb_enable_regs(NvmeCtrl *n) in nvme_cmb_enable_regs()
7794 static void nvme_write_bar(NvmeCtrl *n, hwaddr offset, uint64_t data, in nvme_write_bar()
8034 NvmeCtrl *n = (NvmeCtrl *)opaque; in nvme_mmio_read() local
8078 static void nvme_process_db(NvmeCtrl *n, hwaddr addr, int val) in nvme_process_db()
8227 NvmeCtrl *n = (NvmeCtrl *)opaque; in nvme_mmio_write() local
8257 NvmeCtrl *n = (NvmeCtrl *)opaque; in nvme_cmb_write() local
8263 NvmeCtrl *n = (NvmeCtrl *)opaque; in nvme_cmb_read() local
8277 static bool nvme_check_params(NvmeCtrl *n, Error **errp) in nvme_check_params()
8416 static void nvme_init_state(NvmeCtrl *n) in nvme_init_state()
8506 static void nvme_init_cmb(NvmeCtrl *n, PCIDevice *pci_dev) in nvme_init_cmb()
8528 static void nvme_init_pmr(NvmeCtrl *n, PCIDevice *pci_dev) in nvme_init_pmr()
8580 static bool nvme_init_sriov(NvmeCtrl *n, PCIDevice *pci_dev, uint16_t offset, in nvme_init_sriov()
8644 static bool nvme_init_pci(NvmeCtrl *n, PCIDevice *pci_dev, Error **errp) in nvme_init_pci()
8760 static void nvme_init_subnqn(NvmeCtrl *n) in nvme_init_subnqn()
8773 static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev) in nvme_init_ctrl()
8912 static int nvme_init_subsys(NvmeCtrl *n, Error **errp) in nvme_init_subsys()
8938 void nvme_attach_ns(NvmeCtrl *n, NvmeNamespace *ns) in nvme_attach_ns()
8949 NvmeCtrl *n = NVME(pci_dev); in nvme_realize() local
9007 NvmeCtrl *n = NVME(pci_dev); in nvme_exit() local
9097 NvmeCtrl *n = NVME(obj); in nvme_get_smart_warning() local
9106 NvmeCtrl *n = NVME(obj); in nvme_set_smart_warning() local
9139 NvmeCtrl *n = NVME(pci_dev); in nvme_pci_reset() local
9147 NvmeCtrl *n = NVME(dev); in nvme_sriov_post_write_config() local
9207 NvmeCtrl *n = NVME(obj); in nvme_instance_init() local