Lines Matching refs:ctrlr
62 static void *nvd_new_disk(struct nvme_namespace *ns, void *ctrlr);
64 static void *nvd_new_controller(struct nvme_controller *ctrlr);
65 static void nvd_controller_fail(void *ctrlr);
75 struct nvd_controller *ctrlr; member
164 struct nvd_controller *ctrlr; in nvd_unload() local
171 while ((ctrlr = TAILQ_FIRST(&ctrlr_head)) != NULL) { in nvd_unload()
172 TAILQ_REMOVE(&ctrlr_head, ctrlr, tailq); in nvd_unload()
173 TAILQ_FOREACH(ndisk, &ctrlr->disk_head, ctrlr_tailq) in nvd_unload()
175 while (!TAILQ_EMPTY(&ctrlr->disk_head)) in nvd_unload()
176 msleep(&ctrlr->disk_head, &nvd_lock, 0, "nvd_unload",0); in nvd_unload()
177 free(ctrlr, M_NVD); in nvd_unload()
271 TAILQ_REMOVE(&ndisk->ctrlr->disk_head, ndisk, ctrlr_tailq); in nvd_gonecb()
272 if (TAILQ_EMPTY(&ndisk->ctrlr->disk_head)) in nvd_gonecb()
273 wakeup(&ndisk->ctrlr->disk_head); in nvd_gonecb()
396 nvd_new_controller(struct nvme_controller *ctrlr) in nvd_new_controller() argument
417 struct nvd_controller *ctrlr = ctrlr_arg; in nvd_new_disk() local
421 ndisk->ctrlr = ctrlr; in nvd_new_disk()
441 TAILQ_INSERT_TAIL(&ctrlr->disk_head, ndisk, ctrlr_tailq); in nvd_new_disk()
497 struct nvd_controller *ctrlr = ctrlr_arg; in nvd_controller_fail() local
501 TAILQ_REMOVE(&ctrlr_head, ctrlr, tailq); in nvd_controller_fail()
502 TAILQ_FOREACH(ndisk, &ctrlr->disk_head, ctrlr_tailq) in nvd_controller_fail()
504 while (!TAILQ_EMPTY(&ctrlr->disk_head)) in nvd_controller_fail()
505 msleep(&ctrlr->disk_head, &nvd_lock, 0, "nvd_fail", 0); in nvd_controller_fail()
507 free(ctrlr, M_NVD); in nvd_controller_fail()