Lines Matching +full:ctrl +full:- +full:len
1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
17 u32 len = le16_to_cpu(cmd->get_log_page.numdu); in nvmet_get_log_page_len() local
19 len <<= 16; in nvmet_get_log_page_len()
20 len += le16_to_cpu(cmd->get_log_page.numdl); in nvmet_get_log_page_len()
22 len += 1; in nvmet_get_log_page_len()
23 len *= sizeof(u32); in nvmet_get_log_page_len()
25 return len; in nvmet_get_log_page_len()
32 return sizeof(req->sq->ctrl->hostid); in nvmet_feat_data_len()
40 return le64_to_cpu(cmd->get_log_page.lpo); in nvmet_get_log_page_offset()
45 nvmet_req_complete(req, nvmet_zero_sgl(req, 0, req->transfer_len)); in nvmet_execute_get_log_page_noop()
50 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_get_log_page_error() local
56 spin_lock_irqsave(&ctrl->error_lock, flags); in nvmet_execute_get_log_page_error()
57 slot = ctrl->err_counter % NVMET_ERROR_LOG_SLOTS; in nvmet_execute_get_log_page_error()
60 if (nvmet_copy_to_sgl(req, offset, &ctrl->slots[slot], in nvmet_execute_get_log_page_error()
65 slot = NVMET_ERROR_LOG_SLOTS - 1; in nvmet_execute_get_log_page_error()
67 slot--; in nvmet_execute_get_log_page_error()
70 spin_unlock_irqrestore(&ctrl->error_lock, flags); in nvmet_execute_get_log_page_error()
85 if (!req->ns->bdev) in nvmet_get_smart_log_nsid()
88 host_reads = part_stat_read(req->ns->bdev, ios[READ]); in nvmet_get_smart_log_nsid()
90 DIV_ROUND_UP(part_stat_read(req->ns->bdev, sectors[READ]), 1000); in nvmet_get_smart_log_nsid()
91 host_writes = part_stat_read(req->ns->bdev, ios[WRITE]); in nvmet_get_smart_log_nsid()
93 DIV_ROUND_UP(part_stat_read(req->ns->bdev, sectors[WRITE]), 1000); in nvmet_get_smart_log_nsid()
95 put_unaligned_le64(host_reads, &slog->host_reads[0]); in nvmet_get_smart_log_nsid()
96 put_unaligned_le64(data_units_read, &slog->data_units_read[0]); in nvmet_get_smart_log_nsid()
97 put_unaligned_le64(host_writes, &slog->host_writes[0]); in nvmet_get_smart_log_nsid()
98 put_unaligned_le64(data_units_written, &slog->data_units_written[0]); in nvmet_get_smart_log_nsid()
109 struct nvmet_ctrl *ctrl; in nvmet_get_smart_log_all() local
112 ctrl = req->sq->ctrl; in nvmet_get_smart_log_all()
113 xa_for_each(&ctrl->subsys->namespaces, idx, ns) { in nvmet_get_smart_log_all()
115 if (!ns->bdev) in nvmet_get_smart_log_all()
117 host_reads += part_stat_read(ns->bdev, ios[READ]); in nvmet_get_smart_log_all()
119 part_stat_read(ns->bdev, sectors[READ]), 1000); in nvmet_get_smart_log_all()
120 host_writes += part_stat_read(ns->bdev, ios[WRITE]); in nvmet_get_smart_log_all()
122 part_stat_read(ns->bdev, sectors[WRITE]), 1000); in nvmet_get_smart_log_all()
125 put_unaligned_le64(host_reads, &slog->host_reads[0]); in nvmet_get_smart_log_all()
126 put_unaligned_le64(data_units_read, &slog->data_units_read[0]); in nvmet_get_smart_log_all()
127 put_unaligned_le64(host_writes, &slog->host_writes[0]); in nvmet_get_smart_log_all()
128 put_unaligned_le64(data_units_written, &slog->data_units_written[0]); in nvmet_get_smart_log_all()
139 if (req->transfer_len != sizeof(*log)) in nvmet_execute_get_log_page_smart()
146 if (req->cmd->get_log_page.nsid == cpu_to_le32(NVME_NSID_ALL)) in nvmet_execute_get_log_page_smart()
153 spin_lock_irqsave(&req->sq->ctrl->error_lock, flags); in nvmet_execute_get_log_page_smart()
154 put_unaligned_le64(req->sq->ctrl->err_counter, in nvmet_execute_get_log_page_smart()
155 &log->num_err_log_entries); in nvmet_execute_get_log_page_smart()
156 spin_unlock_irqrestore(&req->sq->ctrl->error_lock, flags); in nvmet_execute_get_log_page_smart()
167 log->acs[nvme_admin_get_log_page] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
168 log->acs[nvme_admin_identify] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
169 log->acs[nvme_admin_abort_cmd] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
170 log->acs[nvme_admin_set_features] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
171 log->acs[nvme_admin_get_features] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
172 log->acs[nvme_admin_async_event] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
173 log->acs[nvme_admin_keep_alive] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
175 log->iocs[nvme_cmd_read] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
176 log->iocs[nvme_cmd_write] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
177 log->iocs[nvme_cmd_flush] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
178 log->iocs[nvme_cmd_dsm] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
179 log->iocs[nvme_cmd_write_zeroes] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_nvm()
184 log->iocs[nvme_cmd_zone_append] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_zns()
185 log->iocs[nvme_cmd_zone_mgmt_send] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_zns()
186 log->iocs[nvme_cmd_zone_mgmt_recv] = cpu_to_le32(1 << 0); in nvmet_get_cmd_effects_zns()
200 switch (req->cmd->get_log_page.csi) { in nvmet_execute_get_log_cmd_effects_ns()
226 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_get_log_changed_ns() local
228 size_t len; in nvmet_execute_get_log_changed_ns() local
230 if (req->transfer_len != NVME_MAX_CHANGED_NAMESPACES * sizeof(__le32)) in nvmet_execute_get_log_changed_ns()
233 mutex_lock(&ctrl->lock); in nvmet_execute_get_log_changed_ns()
234 if (ctrl->nr_changed_ns == U32_MAX) in nvmet_execute_get_log_changed_ns()
235 len = sizeof(__le32); in nvmet_execute_get_log_changed_ns()
237 len = ctrl->nr_changed_ns * sizeof(__le32); in nvmet_execute_get_log_changed_ns()
238 status = nvmet_copy_to_sgl(req, 0, ctrl->changed_ns_list, len); in nvmet_execute_get_log_changed_ns()
240 status = nvmet_zero_sgl(req, len, req->transfer_len - len); in nvmet_execute_get_log_changed_ns()
241 ctrl->nr_changed_ns = 0; in nvmet_execute_get_log_changed_ns()
243 mutex_unlock(&ctrl->lock); in nvmet_execute_get_log_changed_ns()
251 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_format_ana_group() local
256 if (!(req->cmd->get_log_page.lsp & NVME_ANA_LOG_RGO)) { in nvmet_format_ana_group()
257 xa_for_each(&ctrl->subsys->namespaces, idx, ns) in nvmet_format_ana_group()
258 if (ns->anagrpid == grpid) in nvmet_format_ana_group()
259 desc->nsids[count++] = cpu_to_le32(ns->nsid); in nvmet_format_ana_group()
262 desc->grpid = cpu_to_le32(grpid); in nvmet_format_ana_group()
263 desc->nnsids = cpu_to_le32(count); in nvmet_format_ana_group()
264 desc->chgcnt = cpu_to_le64(nvmet_ana_chgcnt); in nvmet_format_ana_group()
265 desc->state = req->port->ana_state[grpid]; in nvmet_format_ana_group()
266 memset(desc->rsvd17, 0, sizeof(desc->rsvd17)); in nvmet_format_ana_group()
275 size_t len; in nvmet_execute_get_log_page_ana() local
290 len = nvmet_format_ana_group(req, grpid, desc); in nvmet_execute_get_log_page_ana()
291 status = nvmet_copy_to_sgl(req, offset, desc, len); in nvmet_execute_get_log_page_ana()
294 offset += len; in nvmet_execute_get_log_page_ana()
317 if (!nvmet_check_transfer_len(req, nvmet_get_log_page_len(req->cmd))) in nvmet_execute_get_log_page()
320 switch (req->cmd->get_log_page.lid) { in nvmet_execute_get_log_page()
340 req->cmd->get_log_page.lid, req->sq->qid); in nvmet_execute_get_log_page()
341 req->error_loc = offsetof(struct nvme_get_log_page_command, lid); in nvmet_execute_get_log_page()
347 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_identify_ctrl() local
348 struct nvmet_subsys *subsys = ctrl->subsys; in nvmet_execute_identify_ctrl()
353 if (!subsys->subsys_discovered) { in nvmet_execute_identify_ctrl()
354 mutex_lock(&subsys->lock); in nvmet_execute_identify_ctrl()
355 subsys->subsys_discovered = true; in nvmet_execute_identify_ctrl()
356 mutex_unlock(&subsys->lock); in nvmet_execute_identify_ctrl()
366 id->vid = 0; in nvmet_execute_identify_ctrl()
367 id->ssvid = 0; in nvmet_execute_identify_ctrl()
369 memcpy(id->sn, ctrl->subsys->serial, NVMET_SN_MAX_SIZE); in nvmet_execute_identify_ctrl()
370 memcpy_and_pad(id->mn, sizeof(id->mn), subsys->model_number, in nvmet_execute_identify_ctrl()
371 strlen(subsys->model_number), ' '); in nvmet_execute_identify_ctrl()
372 memcpy_and_pad(id->fr, sizeof(id->fr), in nvmet_execute_identify_ctrl()
375 id->rab = 6; in nvmet_execute_identify_ctrl()
383 id->cmic = (1 << 0) | (1 << 1) | (1 << 3); in nvmet_execute_identify_ctrl()
386 if (ctrl->ops->get_mdts) in nvmet_execute_identify_ctrl()
387 id->mdts = ctrl->ops->get_mdts(ctrl); in nvmet_execute_identify_ctrl()
389 id->mdts = 0; in nvmet_execute_identify_ctrl()
391 id->cntlid = cpu_to_le16(ctrl->cntlid); in nvmet_execute_identify_ctrl()
392 id->ver = cpu_to_le32(ctrl->subsys->ver); in nvmet_execute_identify_ctrl()
395 id->oaes = cpu_to_le32(NVMET_AEN_CFG_OPTIONAL); in nvmet_execute_identify_ctrl()
396 id->ctratt = cpu_to_le32(NVME_CTRL_ATTR_HID_128_BIT | in nvmet_execute_identify_ctrl()
399 id->oacs = 0; in nvmet_execute_identify_ctrl()
406 id->acl = 3; in nvmet_execute_identify_ctrl()
408 id->aerl = NVMET_ASYNC_EVENTS - 1; in nvmet_execute_identify_ctrl()
410 /* first slot is read-only, only one slot supported */ in nvmet_execute_identify_ctrl()
411 id->frmw = (1 << 0) | (1 << 1); in nvmet_execute_identify_ctrl()
412 id->lpa = (1 << 0) | (1 << 1) | (1 << 2); in nvmet_execute_identify_ctrl()
413 id->elpe = NVMET_ERROR_LOG_SLOTS - 1; in nvmet_execute_identify_ctrl()
414 id->npss = 0; in nvmet_execute_identify_ctrl()
416 /* We support keep-alive timeout in granularity of seconds */ in nvmet_execute_identify_ctrl()
417 id->kas = cpu_to_le16(NVMET_KAS); in nvmet_execute_identify_ctrl()
419 id->sqes = (0x6 << 4) | 0x6; in nvmet_execute_identify_ctrl()
420 id->cqes = (0x4 << 4) | 0x4; in nvmet_execute_identify_ctrl()
422 /* no enforcement soft-limit for maxcmd - pick arbitrary high value */ in nvmet_execute_identify_ctrl()
423 id->maxcmd = cpu_to_le16(NVMET_MAX_CMD); in nvmet_execute_identify_ctrl()
425 id->nn = cpu_to_le32(NVMET_MAX_NAMESPACES); in nvmet_execute_identify_ctrl()
426 id->mnan = cpu_to_le32(NVMET_MAX_NAMESPACES); in nvmet_execute_identify_ctrl()
427 id->oncs = cpu_to_le16(NVME_CTRL_ONCS_DSM | in nvmet_execute_identify_ctrl()
431 id->vwc = NVME_CTRL_VWC_PRESENT; in nvmet_execute_identify_ctrl()
437 id->awun = 0; in nvmet_execute_identify_ctrl()
438 id->awupf = 0; in nvmet_execute_identify_ctrl()
440 id->sgls = cpu_to_le32(1 << 0); /* we always support SGLs */ in nvmet_execute_identify_ctrl()
441 if (ctrl->ops->flags & NVMF_KEYED_SGLS) in nvmet_execute_identify_ctrl()
442 id->sgls |= cpu_to_le32(1 << 2); in nvmet_execute_identify_ctrl()
443 if (req->port->inline_data_size) in nvmet_execute_identify_ctrl()
444 id->sgls |= cpu_to_le32(1 << 20); in nvmet_execute_identify_ctrl()
446 strlcpy(id->subnqn, ctrl->subsys->subsysnqn, sizeof(id->subnqn)); in nvmet_execute_identify_ctrl()
449 * Max command capsule size is sqe + in-capsule data size. in nvmet_execute_identify_ctrl()
450 * Disable in-capsule data for Metadata capable controllers. in nvmet_execute_identify_ctrl()
453 if (!ctrl->pi_support) in nvmet_execute_identify_ctrl()
454 cmd_capsule_size += req->port->inline_data_size; in nvmet_execute_identify_ctrl()
455 id->ioccsz = cpu_to_le32(cmd_capsule_size / 16); in nvmet_execute_identify_ctrl()
458 id->iorcsz = cpu_to_le32(sizeof(struct nvme_completion) / 16); in nvmet_execute_identify_ctrl()
460 id->msdbd = ctrl->ops->msdbd; in nvmet_execute_identify_ctrl()
462 id->anacap = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4); in nvmet_execute_identify_ctrl()
463 id->anatt = 10; /* random value */ in nvmet_execute_identify_ctrl()
464 id->anagrpmax = cpu_to_le32(NVMET_MAX_ANAGRPS); in nvmet_execute_identify_ctrl()
465 id->nanagrpid = cpu_to_le32(NVMET_MAX_ANAGRPS); in nvmet_execute_identify_ctrl()
471 id->psd[0].max_power = cpu_to_le16(0x9c4); in nvmet_execute_identify_ctrl()
472 id->psd[0].entry_lat = cpu_to_le32(0x10); in nvmet_execute_identify_ctrl()
473 id->psd[0].exit_lat = cpu_to_le32(0x4); in nvmet_execute_identify_ctrl()
475 id->nwpc = 1 << 0; /* write protect and no write protect */ in nvmet_execute_identify_ctrl()
489 if (le32_to_cpu(req->cmd->identify.nsid) == NVME_NSID_ALL) { in nvmet_execute_identify_ns()
490 req->error_loc = offsetof(struct nvme_identify, nsid); in nvmet_execute_identify_ns()
508 nvmet_ns_revalidate(req->ns); in nvmet_execute_identify_ns()
514 id->ncap = id->nsze = in nvmet_execute_identify_ns()
515 cpu_to_le64(req->ns->size >> req->ns->blksize_shift); in nvmet_execute_identify_ns()
516 switch (req->port->ana_state[req->ns->anagrpid]) { in nvmet_execute_identify_ns()
521 id->nuse = id->nsze; in nvmet_execute_identify_ns()
525 if (req->ns->bdev) in nvmet_execute_identify_ns()
526 nvmet_bdev_set_limits(req->ns->bdev, id); in nvmet_execute_identify_ns()
532 id->nlbaf = 0; in nvmet_execute_identify_ns()
533 id->flbas = 0; in nvmet_execute_identify_ns()
539 id->nmic = (1 << 0); in nvmet_execute_identify_ns()
540 id->anagrpid = cpu_to_le32(req->ns->anagrpid); in nvmet_execute_identify_ns()
542 memcpy(&id->nguid, &req->ns->nguid, sizeof(id->nguid)); in nvmet_execute_identify_ns()
544 id->lbaf[0].ds = req->ns->blksize_shift; in nvmet_execute_identify_ns()
546 if (req->sq->ctrl->pi_support && nvmet_ns_has_pi(req->ns)) { in nvmet_execute_identify_ns()
547 id->dpc = NVME_NS_DPC_PI_FIRST | NVME_NS_DPC_PI_LAST | in nvmet_execute_identify_ns()
550 id->mc = NVME_MC_EXTENDED_LBA; in nvmet_execute_identify_ns()
551 id->dps = req->ns->pi_type; in nvmet_execute_identify_ns()
552 id->flbas = NVME_NS_FLBAS_META_EXT; in nvmet_execute_identify_ns()
553 id->lbaf[0].ms = cpu_to_le16(req->ns->metadata_size); in nvmet_execute_identify_ns()
556 if (req->ns->readonly) in nvmet_execute_identify_ns()
557 id->nsattr |= (1 << 0); in nvmet_execute_identify_ns()
570 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_identify_nslist() local
573 u32 min_nsid = le32_to_cpu(req->cmd->identify.nsid); in nvmet_execute_identify_nslist()
584 xa_for_each(&ctrl->subsys->namespaces, idx, ns) { in nvmet_execute_identify_nslist()
585 if (ns->nsid <= min_nsid) in nvmet_execute_identify_nslist()
587 list[i++] = cpu_to_le32(ns->nsid); in nvmet_execute_identify_nslist()
599 static u16 nvmet_copy_ns_identifier(struct nvmet_req *req, u8 type, u8 len, in nvmet_copy_ns_identifier() argument
604 .nidl = len, in nvmet_copy_ns_identifier()
613 status = nvmet_copy_to_sgl(req, *off, id, len); in nvmet_copy_ns_identifier()
616 *off += len; in nvmet_copy_ns_identifier()
630 if (memchr_inv(&req->ns->uuid, 0, sizeof(req->ns->uuid))) { in nvmet_execute_identify_desclist()
633 &req->ns->uuid, &off); in nvmet_execute_identify_desclist()
637 if (memchr_inv(req->ns->nguid, 0, sizeof(req->ns->nguid))) { in nvmet_execute_identify_desclist()
640 &req->ns->nguid, &off); in nvmet_execute_identify_desclist()
647 &req->ns->csi, &off); in nvmet_execute_identify_desclist()
651 if (sg_zero_buffer(req->sg, req->sg_cnt, NVME_IDENTIFY_DATA_SIZE - off, in nvmet_execute_identify_desclist()
652 off) != NVME_IDENTIFY_DATA_SIZE - off) in nvmet_execute_identify_desclist()
661 switch (req->cmd->identify.csi) { in nvmet_handle_identify_desclist()
681 switch (req->cmd->identify.cns) { in nvmet_execute_identify()
683 switch (req->cmd->identify.csi) { in nvmet_execute_identify()
692 switch (req->cmd->identify.csi) { in nvmet_execute_identify()
701 switch (req->cmd->identify.csi) { in nvmet_execute_identify()
708 switch (req->cmd->identify.csi) { in nvmet_execute_identify()
717 switch (req->cmd->identify.csi) { in nvmet_execute_identify()
752 if (req->ns->file) in nvmet_write_protect_flush_sync()
758 pr_err("write protect flush failed nsid: %u\n", req->ns->nsid); in nvmet_write_protect_flush_sync()
764 u32 write_protect = le32_to_cpu(req->cmd->common.cdw11); in nvmet_set_feat_write_protect()
772 mutex_lock(&subsys->lock); in nvmet_set_feat_write_protect()
775 req->ns->readonly = true; in nvmet_set_feat_write_protect()
778 req->ns->readonly = false; in nvmet_set_feat_write_protect()
781 req->ns->readonly = false; in nvmet_set_feat_write_protect()
789 nvmet_ns_changed(subsys, req->ns->nsid); in nvmet_set_feat_write_protect()
790 mutex_unlock(&subsys->lock); in nvmet_set_feat_write_protect()
796 u32 val32 = le32_to_cpu(req->cmd->common.cdw11); in nvmet_set_feat_kato()
798 nvmet_stop_keep_alive_timer(req->sq->ctrl); in nvmet_set_feat_kato()
799 req->sq->ctrl->kato = DIV_ROUND_UP(val32, 1000); in nvmet_set_feat_kato()
800 nvmet_start_keep_alive_timer(req->sq->ctrl); in nvmet_set_feat_kato()
802 nvmet_set_result(req, req->sq->ctrl->kato); in nvmet_set_feat_kato()
809 u32 val32 = le32_to_cpu(req->cmd->common.cdw11); in nvmet_set_feat_async_event()
812 req->error_loc = offsetof(struct nvme_common_command, cdw11); in nvmet_set_feat_async_event()
816 WRITE_ONCE(req->sq->ctrl->aen_enabled, val32); in nvmet_set_feat_async_event()
825 u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10); in nvmet_execute_set_features()
826 u32 cdw11 = le32_to_cpu(req->cmd->common.cdw11); in nvmet_execute_set_features()
843 (subsys->max_qid - 1) | ((subsys->max_qid - 1) << 16)); in nvmet_execute_set_features()
858 req->error_loc = offsetof(struct nvme_common_command, cdw10); in nvmet_execute_set_features()
875 mutex_lock(&subsys->lock); in nvmet_get_feat_write_protect()
876 if (req->ns->readonly == true) in nvmet_get_feat_write_protect()
881 mutex_unlock(&subsys->lock); in nvmet_get_feat_write_protect()
888 nvmet_set_result(req, req->sq->ctrl->kato * 1000); in nvmet_get_feat_kato()
893 nvmet_set_result(req, READ_ONCE(req->sq->ctrl->aen_enabled)); in nvmet_get_feat_async_event()
899 u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10); in nvmet_execute_get_features()
935 (subsys->max_qid-1) | ((subsys->max_qid-1) << 16)); in nvmet_execute_get_features()
941 /* need 128-bit host identifier flag */ in nvmet_execute_get_features()
942 if (!(req->cmd->common.cdw11 & cpu_to_le32(1 << 0))) { in nvmet_execute_get_features()
943 req->error_loc = in nvmet_execute_get_features()
949 status = nvmet_copy_to_sgl(req, 0, &req->sq->ctrl->hostid, in nvmet_execute_get_features()
950 sizeof(req->sq->ctrl->hostid)); in nvmet_execute_get_features()
956 req->error_loc = in nvmet_execute_get_features()
967 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_async_event() local
972 mutex_lock(&ctrl->lock); in nvmet_execute_async_event()
973 if (ctrl->nr_async_event_cmds >= NVMET_ASYNC_EVENTS) { in nvmet_execute_async_event()
974 mutex_unlock(&ctrl->lock); in nvmet_execute_async_event()
978 ctrl->async_event_cmds[ctrl->nr_async_event_cmds++] = req; in nvmet_execute_async_event()
979 mutex_unlock(&ctrl->lock); in nvmet_execute_async_event()
981 schedule_work(&ctrl->async_event_work); in nvmet_execute_async_event()
986 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_keep_alive() local
992 if (!ctrl->kato) { in nvmet_execute_keep_alive()
997 pr_debug("ctrl %d update keep-alive timer for %d secs\n", in nvmet_execute_keep_alive()
998 ctrl->cntlid, ctrl->kato); in nvmet_execute_keep_alive()
999 mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ); in nvmet_execute_keep_alive()
1006 struct nvme_command *cmd = req->cmd; in nvmet_parse_admin_cmd()
1011 if (nvmet_req_subsys(req)->type == NVME_NQN_DISC) in nvmet_parse_admin_cmd()
1021 switch (cmd->common.opcode) { in nvmet_parse_admin_cmd()
1023 req->execute = nvmet_execute_get_log_page; in nvmet_parse_admin_cmd()
1026 req->execute = nvmet_execute_identify; in nvmet_parse_admin_cmd()
1029 req->execute = nvmet_execute_abort; in nvmet_parse_admin_cmd()
1032 req->execute = nvmet_execute_set_features; in nvmet_parse_admin_cmd()
1035 req->execute = nvmet_execute_get_features; in nvmet_parse_admin_cmd()
1038 req->execute = nvmet_execute_async_event; in nvmet_parse_admin_cmd()
1041 req->execute = nvmet_execute_keep_alive; in nvmet_parse_admin_cmd()