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()
577 int nvmet_passthru_ctrl_enable(struct nvmet_subsys *subsys) in nvmet_passthru_ctrl_enable() argument
584 mutex_lock(&subsys->lock); in nvmet_passthru_ctrl_enable()
585 if (!subsys->passthru_ctrl_path) in nvmet_passthru_ctrl_enable()
587 if (subsys->passthru_ctrl) in nvmet_passthru_ctrl_enable()
590 if (subsys->nr_namespaces) { in nvmet_passthru_ctrl_enable()
595 file = filp_open(subsys->passthru_ctrl_path, O_RDWR, 0); in nvmet_passthru_ctrl_enable()
604 subsys->passthru_ctrl_path); in nvmet_passthru_ctrl_enable()
610 subsys, GFP_KERNEL); in nvmet_passthru_ctrl_enable()
619 subsys->passthru_ctrl = ctrl; in nvmet_passthru_ctrl_enable()
620 subsys->ver = ctrl->vs; in nvmet_passthru_ctrl_enable()
622 if (subsys->ver < NVME_VS(1, 2, 1)) { in nvmet_passthru_ctrl_enable()
624 NVME_MAJOR(subsys->ver), NVME_MINOR(subsys->ver), in nvmet_passthru_ctrl_enable()
625 NVME_TERTIARY(subsys->ver)); in nvmet_passthru_ctrl_enable()
626 subsys->ver = NVME_VS(1, 2, 1); in nvmet_passthru_ctrl_enable()
629 __module_get(subsys->passthru_ctrl->ops->module); in nvmet_passthru_ctrl_enable()
635 mutex_unlock(&subsys->lock); in nvmet_passthru_ctrl_enable()
639 static void __nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys) in __nvmet_passthru_ctrl_disable() argument
641 if (subsys->passthru_ctrl) { in __nvmet_passthru_ctrl_disable()
642 xa_erase(&passthru_subsystems, subsys->passthru_ctrl->instance); in __nvmet_passthru_ctrl_disable()
643 module_put(subsys->passthru_ctrl->ops->module); in __nvmet_passthru_ctrl_disable()
644 nvme_put_ctrl(subsys->passthru_ctrl); in __nvmet_passthru_ctrl_disable()
646 subsys->passthru_ctrl = NULL; in __nvmet_passthru_ctrl_disable()
647 subsys->ver = NVMET_DEFAULT_VS; in __nvmet_passthru_ctrl_disable()
650 void nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys) in nvmet_passthru_ctrl_disable() argument
652 mutex_lock(&subsys->lock); in nvmet_passthru_ctrl_disable()
653 __nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_ctrl_disable()
654 mutex_unlock(&subsys->lock); in nvmet_passthru_ctrl_disable()
657 void nvmet_passthru_subsys_free(struct nvmet_subsys *subsys) in nvmet_passthru_subsys_free() argument
659 mutex_lock(&subsys->lock); in nvmet_passthru_subsys_free()
660 __nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_subsys_free()
661 mutex_unlock(&subsys->lock); in nvmet_passthru_subsys_free()
662 kfree(subsys->passthru_ctrl_path); in nvmet_passthru_subsys_free()