Lines Matching refs:subsys
29 if (!nvme_multi_css(ctrl->subsys->passthru_ctrl))
42 if (!ctrl->subsys->clear_ids)
83 struct nvme_ctrl *pctrl = ctrl->subsys->passthru_ctrl;
98 id->ver = cpu_to_le32(ctrl->subsys->ver);
202 if (req->sq->ctrl->subsys->clear_ids) {
573 int nvmet_passthru_ctrl_enable(struct nvmet_subsys *subsys)
580 mutex_lock(&subsys->lock);
581 if (!subsys->passthru_ctrl_path)
583 if (subsys->passthru_ctrl)
586 if (subsys->nr_namespaces) {
591 file = filp_open(subsys->passthru_ctrl_path, O_RDWR, 0);
600 subsys->passthru_ctrl_path);
606 subsys, GFP_KERNEL);
615 subsys->passthru_ctrl = ctrl;
616 subsys->ver = ctrl->vs;
618 if (subsys->ver < NVME_VS(1, 2, 1)) {
620 NVME_MAJOR(subsys->ver), NVME_MINOR(subsys->ver),
621 NVME_TERTIARY(subsys->ver));
622 subsys->ver = NVME_VS(1, 2, 1);
625 __module_get(subsys->passthru_ctrl->ops->module);
631 mutex_unlock(&subsys->lock);
635 static void __nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys)
637 if (subsys->passthru_ctrl) {
638 xa_erase(&passthru_subsystems, subsys->passthru_ctrl->cntlid);
639 module_put(subsys->passthru_ctrl->ops->module);
640 nvme_put_ctrl(subsys->passthru_ctrl);
642 subsys->passthru_ctrl = NULL;
643 subsys->ver = NVMET_DEFAULT_VS;
646 void nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys)
648 mutex_lock(&subsys->lock);
649 __nvmet_passthru_ctrl_disable(subsys);
650 mutex_unlock(&subsys->lock);
653 void nvmet_passthru_subsys_free(struct nvmet_subsys *subsys)
655 mutex_lock(&subsys->lock);
656 __nvmet_passthru_ctrl_disable(subsys);
657 mutex_unlock(&subsys->lock);
658 kfree(subsys->passthru_ctrl_path);