Lines Matching refs:ctrlr
75 struct nvme_controller *ctrlr; in nvme_shutdown() local
77 ctrlr = DEVICE2SOFTC(dev); in nvme_shutdown()
78 nvme_ctrlr_shutdown(ctrlr); in nvme_shutdown()
86 struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); in nvme_attach() local
89 status = nvme_ctrlr_construct(ctrlr, dev); in nvme_attach()
91 nvme_ctrlr_destruct(ctrlr, dev); in nvme_attach()
95 ctrlr->config_hook.ich_func = nvme_ctrlr_start_config_hook; in nvme_attach()
96 ctrlr->config_hook.ich_arg = ctrlr; in nvme_attach()
98 if (config_intrhook_establish(&ctrlr->config_hook) != 0) in nvme_attach()
107 struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); in nvme_detach() local
109 config_intrhook_drain(&ctrlr->config_hook); in nvme_detach()
111 nvme_ctrlr_destruct(ctrlr, dev); in nvme_detach()
117 struct nvme_controller *ctrlr) in nvme_notify() argument
130 if (!ctrlr->is_initialized) in nvme_notify()
133 cmpset = atomic_cmpset_32(&ctrlr->notification_sent, 0, 1); in nvme_notify()
138 ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); in nvme_notify()
141 ctrlr->cons_cookie[cons->id] = ctrlr_cookie; in nvme_notify()
145 (void)atomic_cmpset_32(&ctrlr->notification_sent, 1, 0); in nvme_notify()
149 if (ctrlr->is_failed) { in nvme_notify()
150 ctrlr->cons_cookie[cons->id] = NULL; in nvme_notify()
159 for (ns_idx = 0; ns_idx < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); ns_idx++) { in nvme_notify()
160 ns = &ctrlr->ns[ns_idx]; in nvme_notify()
170 nvme_notify_new_controller(struct nvme_controller *ctrlr) in nvme_notify_new_controller() argument
176 nvme_notify(&nvme_consumer[i], ctrlr); in nvme_notify_new_controller()
185 struct nvme_controller *ctrlr; in nvme_notify_new_consumer() local
192 ctrlr = DEVICE2SOFTC(devlist[dev_idx]); in nvme_notify_new_consumer()
193 nvme_notify(cons, ctrlr); in nvme_notify_new_consumer()
200 nvme_notify_async_consumers(struct nvme_controller *ctrlr, in nvme_notify_async_consumers() argument
212 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { in nvme_notify_async_consumers()
220 nvme_notify_fail_consumers(struct nvme_controller *ctrlr) in nvme_notify_fail_consumers() argument
232 if (!ctrlr->is_initialized) in nvme_notify_fail_consumers()
238 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { in nvme_notify_fail_consumers()
239 ctrlr->cons_cookie[i] = NULL; in nvme_notify_fail_consumers()
247 nvme_notify_ns(struct nvme_controller *ctrlr, int nsid) in nvme_notify_ns() argument
256 device_get_nameunit(ctrlr->dev), nsid)); in nvme_notify_ns()
258 if (!ctrlr->is_initialized) in nvme_notify_ns()
261 ns = &ctrlr->ns[nsid - 1]; in nvme_notify_ns()
265 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) in nvme_notify_ns()