/freebsd/sbin/nvmecontrol/ |
H A D | ns.c | 195 uint32_t nsid; member 198 .nsid = NONE - 1, 203 OPT("namespace-id", 'n', arg_uint32, delete_opt, nsid, 225 uint32_t nsid; member 229 .nsid = NONE, 235 OPT("namespace-id", 'n', arg_uint32, attach_opt, nsid, 259 uint32_t nsid; member 262 .nsid = NONE, 267 OPT("namespace-id", 'n', arg_uint32, attached_opt, nsid, 289 uint32_t nsid; member 326 uint32_t nsid; global() member 403 uint32_t nsid; nsactive() local 448 uint32_t nsid; nsallocated() local 493 uint32_t nsid; nscontrollers() local 546 uint32_t nsid; nscreate() local 636 uint32_t nsid; nsdelete() local 703 uint32_t nsid; nsattach() local 773 uint32_t nsid; nsdetach() local 850 uint32_t nsid; nsattached() local 903 uint32_t nsid; nsidentify() local [all...] |
H A D | devlist.c | 92 scan_namespace(int fd, int ctrlr, uint32_t nsid) in scan_namespace() argument 99 if (read_namespace_data(fd, nsid, &nsdata) != 0) in scan_namespace() 104 NVME_NS_PREFIX, nsid); in scan_namespace() 122 uint32_t nsid; in scan_controller() local 143 nsid = 0; in scan_controller() 145 if (read_active_namespaces(fd, nsid, &nslist) != 0) in scan_controller() 148 nsid = nslist.ns[i]; in scan_controller() 149 if (nsid == 0) { in scan_controller() 153 scan_namespace(fd, ctrlr, nsid); in scan_controller() 155 if (nsid == 0 || nsid >= NVME_GLOBAL_NAMESPACE_TAG - 1) in scan_controller()
|
H A D | resv.c | 239 uint32_t nsid; in resvacquire() local 244 get_nsid(fd, NULL, &nsid); in resvacquire() 245 if (nsid == 0) { in resvacquire() 255 pt.cmd.nsid = htole32(nsid); in resvacquire() 278 uint32_t nsid; in resvregister() local 283 get_nsid(fd, NULL, &nsid); in resvregister() 284 if (nsid == 0) { in resvregister() 294 pt.cmd.nsid = htole32(nsid); in resvregister() 317 uint32_t nsid; in resvrelease() local 322 get_nsid(fd, NULL, &nsid); in resvrelease() [all …]
|
H A D | identify.c | 52 uint32_t nsid; member 57 .nsid = NONE, 212 identify_ns(int fd, uint32_t nsid) in identify_ns() argument 217 if (read_namespace_data(fd, nsid, &nsdata)) in identify_ns() 240 uint32_t nsid; in identify() local 246 get_nsid(fd, &path, &nsid); in identify() 247 if (nsid != 0) { in identify() 258 if (opt.nsid != NONE) in identify() 259 nsid = opt.nsid; in identify() 261 if (nsid == 0) in identify() [all …]
|
H A D | nvmecontrol.c | 122 read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata) in read_namespace_data() argument 128 pt.cmd.nsid = htole32(nsid); in read_namespace_data() 146 read_active_namespaces(int fd, uint32_t nsid, struct nvme_ns_list *nslist) in read_active_namespaces() argument 152 pt.cmd.nsid = htole32(nsid); in read_active_namespaces() 191 get_nsid(int fd, char **ctrlr_str, uint32_t *nsid) in get_nsid() argument 199 if (nsid != NULL) in get_nsid() 200 *nsid = gnsid.nsid; in get_nsid()
|
H A D | selftest.c | 56 selftest_op(int fd, uint32_t nsid, uint8_t stc) in selftest_op() argument 62 pt.cmd.nsid = htole32(nsid); in selftest_op() 81 uint32_t nsid; in selftest() local 87 get_nsid(fd, &path, &nsid); in selftest() 88 if (nsid != 0) { in selftest() 105 selftest_op(fd, nsid, opt.stc); in selftest()
|
H A D | format.c | 119 uint32_t nsid; in format() local 144 get_nsid(fd, &path, &nsid); in format() 145 if (nsid == 0) { in format() 146 nsid = NVME_GLOBAL_NAMESPACE_TAG; in format() 168 if (nsid != NVME_GLOBAL_NAMESPACE_TAG) { in format() 177 if (read_namespace_data(fd, nsid, &nsd)) in format() 204 pt.cmd.nsid = htole32(nsid); in format()
|
H A D | telemetry.c | 98 uint32_t nsid; in telemetry_log() local 114 get_nsid(fd, &path, &nsid); in telemetry_log() 115 if (nsid == 0) { in telemetry_log() 116 nsid = NVME_GLOBAL_NAMESPACE_TAG; in telemetry_log() 129 if (nsid != NVME_GLOBAL_NAMESPACE_TAG) in telemetry_log() 139 read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, 0, in telemetry_log() 161 read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, 0, in telemetry_log()
|
H A D | nsid.c | 68 uint32_t nsid; in gnsid() local 74 get_nsid(fd, &path, &nsid); in gnsid() 76 printf("%s\t%u\n", path, nsid); in gnsid()
|
H A D | reset.c | 58 uint32_t nsid; in reset() local 63 get_nsid(fd, &path, &nsid); in reset() 64 if (nsid != 0) { in reset()
|
H A D | nvmecontrol.h | 81 void get_nsid(int fd, char **ctrlr_str, uint32_t *nsid); 83 int read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata); 84 int read_active_namespaces(int fd, uint32_t nsid, struct nvme_ns_list *nslist); 87 void read_logpage(int fd, uint8_t log_page, uint32_t nsid, uint8_t lsp,
|
H A D | passthru.c | 48 uint32_t nsid; member 83 .nsid = 0, 128 ARG("namespace-id", 'n', arg_uint32, opt, nsid, 204 fprintf(stderr, "nsid : %#04x\n", opt.nsid); in passthru() 229 pt.cmd.nsid = opt.nsid; /* XXX note: kernel overrides this */ in passthru()
|
H A D | logpage.c | 192 read_logpage(int fd, uint8_t log_page, uint32_t nsid, uint8_t lsp, in read_logpage() 202 pt.cmd.nsid = htole32(nsid); in read_logpage() 271 printf(" Namespace ID: %u\n", letoh(entry->nsid)); in print_log_error() 482 printf("Namespace ID: 0x%x\n", letoh(rn->nsid)); in print_log_command_effects() 622 printf(" NSID=0x%x", letoh(dst->result[r].nsid)); in print_log_self_test_status() 719 uint32_t nsid, size; 740 get_nsid(fd, &path, &nsid); 741 if (nsid == 0) { in logpage() 742 nsid in logpage() 191 read_logpage(int fd,uint8_t log_page,uint32_t nsid,uint8_t lsp,uint16_t lsi,uint8_t rae,void * payload,uint32_t payload_size) read_logpage() argument 745 uint32_t nsid, size; logpage() local [all...] |
H A D | sanitize.c | 113 uint32_t nsid; in sanitize() local 147 get_nsid(fd, &path, &nsid); in sanitize() 148 if (nsid != 0) { in sanitize() 171 if (nsid != 0 && cd.nn > 1) in sanitize()
|
H A D | power.c | 143 uint32_t nsid; in power() local 154 get_nsid(fd, &path, &nsid); in power() 155 if (nsid != 0) { in power()
|
H A D | firmware.c | 235 int32_t size = 0, nsid; in firmware() 271 get_nsid(fd, &path, &nsid); in firmware() 272 if (nsid != 0) { in firmware() 234 int32_t size = 0, nsid; firmware() local
|
/freebsd/sys/dev/nvmf/host/ |
H A D | nvmf.c | 314 uint32_t nsid; in nvmf_scan_active_nslist() local 341 nsid = nslist->ns[i]; in nvmf_scan_active_nslist() 342 if (nsid == 0) { in nvmf_scan_active_nslist() 349 if (!nvmf_cmd_identify_namespace(sc, nsid, data, nvmf_complete, in nvmf_scan_active_nslist() 353 nsid); in nvmf_scan_active_nslist() 360 "IDENTIFY namespace %u failed, status %#x\n", nsid, in nvmf_scan_active_nslist() 368 nsid, status.io_error); in nvmf_scan_active_nslist() 373 if (!cb(sc, nsid, data, cb_arg)) in nvmf_scan_active_nslist() 377 MPASS(nsid == nslist->ns[nitems(nslist->ns) - 1] && nsid != 0); in nvmf_scan_active_nslist() 379 if (nsid >= NVME_GLOBAL_NAMESPACE_TAG - 1) in nvmf_scan_active_nslist() [all …]
|
H A D | nvmf_aer.c | 58 uint32_t nsid; in nvmf_handle_changed_namespaces() local 73 nsid = le32toh(ns_list->ns[i]); in nvmf_handle_changed_namespaces() 74 nvmf_rescan_ns(sc, nsid); in nvmf_handle_changed_namespaces()
|
/freebsd/sys/dev/nvme/ |
H A D | nvme_ctrlr_cmd.c | 55 nvme_ctrlr_cmd_identify_namespace(struct nvme_controller *ctrlr, uint32_t nsid, in nvme_ctrlr_cmd_identify_namespace() argument 70 cmd->nsid = htole32(nsid); in nvme_ctrlr_cmd_identify_namespace() 256 uint32_t nsid, void *payload, uint32_t payload_size, nvme_cb_fn_t cb_fn, in nvme_ctrlr_cmd_get_log_page() argument 271 cmd->nsid = htole32(nsid); in nvme_ctrlr_cmd_get_log_page() 302 uint32_t nsid, struct nvme_health_information_page *payload, in nvme_ctrlr_cmd_get_health_information_page() argument 307 nsid, payload, sizeof(*payload), cb_fn, cb_arg); in nvme_ctrlr_cmd_get_health_information_page()
|
H A D | nvme.h | 818 uint32_t nsid; /* namespace identifier */ 1561 uint32_t nsid; 1651 uint32_t nsid; 1734 uint32_t nsid; 1844 * * nsid (namespace id) - for admin commands only 1891 uint32_t nsid; 1930 uint32_t nsid, int is_user_buffer, 1935 uint32_t nsid, bool is_user, 1950 uint8_t log_page, uint32_t nsid, 2015 void nvme_ns_flush_cmd(struct nvme_command *cmd, uint32_t nsid) in nvme_ns_rw_cmd() argument 810 uint32_t nsid; /* namespace identifier */ global() member 1553 uint32_t nsid; global() member 1643 uint32_t nsid; global() member 1726 uint32_t nsid; global() member 1883 uint32_t nsid; global() member 2007 nvme_ns_flush_cmd(struct nvme_command * cmd,uint32_t nsid) nvme_ns_flush_cmd() argument 2026 nvme_ns_write_cmd(struct nvme_command * cmd,uint32_t nsid,uint64_t lba,uint32_t count) nvme_ns_write_cmd() argument 2033 nvme_ns_read_cmd(struct nvme_command * cmd,uint32_t nsid,uint64_t lba,uint32_t count) nvme_ns_read_cmd() argument 2040 nvme_ns_trim_cmd(struct nvme_command * cmd,uint32_t nsid,uint32_t num_ranges) nvme_ns_trim_cmd() argument [all...] |
H A D | nvme.c | 246 nvme_notify_ns(struct nvme_controller *ctrlr, int nsid) in nvme_notify_ns() argument 253 KASSERT(nsid <= NVME_MAX_NAMESPACES, in nvme_notify_ns() 255 device_get_nameunit(ctrlr->dev), nsid)); in nvme_notify_ns() 260 ns = &ctrlr->ns[nsid - 1]; in nvme_notify_ns()
|
/freebsd/sys/cam/nvme/ |
H A D | nvme_all.c | 64 nvme_ns_cmd(struct ccb_nvmeio *nvmeio, uint8_t cmd, uint32_t nsid, in nvme_ns_cmd() argument 70 nvmeio->cmd.nsid = htole32(nsid); in nvme_ns_cmd() 183 cmd->opc, cmd->fuse, cmd->nsid, in nvme_cmd_sbuf()
|
/freebsd/sbin/nvmecontrol/tests/ |
H A D | basic.sh | 168 atf_test_case nsid 177 atf_check -o not-empty -e empty nvmecontrol nsid ${TEST_DEV} 179 atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol nsid ${TEST_DEV} 181 atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol nsid ${INV_OPT} ${TEST_DEV} 232 atf_add_test_case nsid
|
/freebsd/sys/dev/nvmf/controller/ |
H A D | ctl_frontend_nvmf.c | 104 uint32_t nsid; in nvmft_lun_enable() local 112 nsid = lun_id + 1; in nvmft_lun_enable() 118 if (np->active_ns[i] < nsid) in nvmft_lun_enable() 120 if (np->active_ns[i] == nsid) { in nvmft_lun_enable() 134 new_ns[i] = nsid; in nvmft_lun_enable() 159 uint32_t nsid; in nvmft_lun_disable() local 164 nsid = lun_id + 1; in nvmft_lun_disable() 168 if (np->active_ns[i] == nsid) in nvmft_lun_disable() 194 nvmft_populate_active_nslist(struct nvmft_port *np, uint32_t nsid, in nvmft_populate_active_nslist() argument 202 if (np->active_ns[i] <= nsid) in nvmft_populate_active_nslist() [all …]
|
H A D | nvmft_controller.c | 688 uint32_t nsid; in handle_identify_command() local 690 nsid = le32toh(cmd->nsid); in handle_identify_command() 691 if (nsid >= 0xfffffffe) { in handle_identify_command() 697 nvmft_populate_active_nslist(ctrlr->np, nsid, nslist); in handle_identify_command() 1020 if (cmd->nsid == htole32(0xffffffff)) { in nvmft_handle_io_command() 1089 uint32_t new_nsid, nsid; in nvmft_controller_lun_changed() local 1101 nsid = le32toh(nslist->ns[i]); in nvmft_controller_lun_changed() 1102 if (nsid == new_nsid) { in nvmft_controller_lun_changed() 1108 if (nsid == 0 || nsid > new_nsid) in nvmft_controller_lun_changed()
|