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()
575 int nvmet_passthru_ctrl_enable(struct nvmet_subsys *subsys) in nvmet_passthru_ctrl_enable() argument
582 mutex_lock(&subsys->lock); in nvmet_passthru_ctrl_enable()
583 if (!subsys->passthru_ctrl_path) in nvmet_passthru_ctrl_enable()
585 if (subsys->passthru_ctrl) in nvmet_passthru_ctrl_enable()
588 if (subsys->nr_namespaces) { in nvmet_passthru_ctrl_enable()
593 file = filp_open(subsys->passthru_ctrl_path, O_RDWR, 0); in nvmet_passthru_ctrl_enable()
602 subsys->passthru_ctrl_path); in nvmet_passthru_ctrl_enable()
608 subsys, GFP_KERNEL); in nvmet_passthru_ctrl_enable()
617 subsys->passthru_ctrl = ctrl; in nvmet_passthru_ctrl_enable()
618 subsys->ver = ctrl->vs; in nvmet_passthru_ctrl_enable()
620 if (subsys->ver < NVME_VS(1, 2, 1)) { in nvmet_passthru_ctrl_enable()
622 NVME_MAJOR(subsys->ver), NVME_MINOR(subsys->ver), in nvmet_passthru_ctrl_enable()
623 NVME_TERTIARY(subsys->ver)); in nvmet_passthru_ctrl_enable()
624 subsys->ver = NVME_VS(1, 2, 1); in nvmet_passthru_ctrl_enable()
627 __module_get(subsys->passthru_ctrl->ops->module); in nvmet_passthru_ctrl_enable()
633 mutex_unlock(&subsys->lock); in nvmet_passthru_ctrl_enable()
637 static void __nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys) in __nvmet_passthru_ctrl_disable() argument
639 if (subsys->passthru_ctrl) { in __nvmet_passthru_ctrl_disable()
640 xa_erase(&passthru_subsystems, subsys->passthru_ctrl->instance); in __nvmet_passthru_ctrl_disable()
641 module_put(subsys->passthru_ctrl->ops->module); in __nvmet_passthru_ctrl_disable()
642 nvme_put_ctrl(subsys->passthru_ctrl); in __nvmet_passthru_ctrl_disable()
644 subsys->passthru_ctrl = NULL; in __nvmet_passthru_ctrl_disable()
645 subsys->ver = NVMET_DEFAULT_VS; in __nvmet_passthru_ctrl_disable()
648 void nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys) in nvmet_passthru_ctrl_disable() argument
650 mutex_lock(&subsys->lock); in nvmet_passthru_ctrl_disable()
651 __nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_ctrl_disable()
652 mutex_unlock(&subsys->lock); in nvmet_passthru_ctrl_disable()
655 void nvmet_passthru_subsys_free(struct nvmet_subsys *subsys) in nvmet_passthru_subsys_free() argument
657 mutex_lock(&subsys->lock); in nvmet_passthru_subsys_free()
658 __nvmet_passthru_ctrl_disable(subsys); in nvmet_passthru_subsys_free()
659 mutex_unlock(&subsys->lock); in nvmet_passthru_subsys_free()
660 kfree(subsys->passthru_ctrl_path); in nvmet_passthru_subsys_free()