Lines Matching full:subsys
29 if (!nvme_multi_css(ctrl->subsys->passthru_ctrl)) in nvmet_passthrough_override_cap()
42 if (!ctrl->subsys->clear_ids) in nvmet_passthru_override_id_descs()
83 struct nvme_ctrl *pctrl = ctrl->subsys->passthru_ctrl; in nvmet_passthru_override_id_ctrl()
98 id->ver = cpu_to_le32(ctrl->subsys->ver); in nvmet_passthru_override_id_ctrl()
202 if (req->sq->ctrl->subsys->clear_ids) { in nvmet_passthru_override_id_ns()
571 int nvmet_passthru_ctrl_enable(struct nvmet_subsys *subsys) in nvmet_passthru_ctrl_enable() argument
578 mutex_lock(&subsys->lock); in nvmet_passthru_ctrl_enable()
579 if (!subsys->passthru_ctrl_path) in nvmet_passthru_ctrl_enable()
581 if (subsys->passthru_ctrl) in nvmet_passthru_ctrl_enable()
584 if (subsys->nr_namespaces) { in nvmet_passthru_ctrl_enable()
589 file = filp_open(subsys->passthru_ctrl_path, O_RDWR, 0); in nvmet_passthru_ctrl_enable()
598 subsys->passthru_ctrl_path); in nvmet_passthru_ctrl_enable()
604 subsys, GFP_KERNEL); in nvmet_passthru_ctrl_enable()
613 subsys->passthru_ctrl = ctrl; in nvmet_passthru_ctrl_enable()
614 subsys->ver = ctrl->vs; in nvmet_passthru_ctrl_enable()
616 if (subsys->ver < NVME_VS(1, 2, 1)) { in nvmet_passthru_ctrl_enable()
618 NVME_MAJOR(subsys->ver), NVME_MINOR(subsys->ver), in nvmet_passthru_ctrl_enable()
619 NVME_TERTIARY(subsys->ver)); in nvmet_passthru_ctrl_enable()
620 subsys->ver = NVME_VS(1, 2, 1); in nvmet_passthru_ctrl_enable()
623 __module_get(subsys->passthru_ctrl->ops->module); in nvmet_passthru_ctrl_enable()
629 mutex_unlock(&subsys->lock); in nvmet_passthru_ctrl_enable()
633 static void __nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys) in __nvmet_passthru_ctrl_disable() argument
635 if (subsys->passthru_ctrl) { in __nvmet_passthru_ctrl_disable()
636 xa_erase(&passthru_subsystems, subsys->passthru_ctrl->instance); in __nvmet_passthru_ctrl_disable()
637 module_put(subsys->passthru_ctrl->ops->module); in __nvmet_passthru_ctrl_disable()
638 nvme_put_ctrl(subsys->passthru_ctrl); in __nvmet_passthru_ctrl_disable()
640 subsys->passthru_ctrl = NULL; in __nvmet_passthru_ctrl_disable()
641 subsys->ver = NVMET_DEFAULT_VS; in __nvmet_passthru_ctrl_disable()
644 void nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys) in nvmet_passthru_ctrl_disable() argument
646 mutex_lock(&subsys->lock); in nvmet_passthru_ctrl_disable()
647 __nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_ctrl_disable()
648 mutex_unlock(&subsys->lock); in nvmet_passthru_ctrl_disable()
651 void nvmet_passthru_subsys_free(struct nvmet_subsys *subsys) in nvmet_passthru_subsys_free() argument
653 mutex_lock(&subsys->lock); in nvmet_passthru_subsys_free()
654 __nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_subsys_free()
655 mutex_unlock(&subsys->lock); in nvmet_passthru_subsys_free()
656 kfree(subsys->passthru_ctrl_path); in nvmet_passthru_subsys_free()