Lines Matching refs:ctrlr

79 	struct nvme_controller	*ctrlr;  in nvme_shutdown()  local
81 ctrlr = DEVICE2SOFTC(dev); in nvme_shutdown()
82 nvme_ctrlr_shutdown(ctrlr); in nvme_shutdown()
123 struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); in nvme_attach() local
126 status = nvme_ctrlr_construct(ctrlr, dev); in nvme_attach()
128 nvme_ctrlr_destruct(ctrlr, dev); in nvme_attach()
132 ctrlr->config_hook.ich_func = nvme_ctrlr_start_config_hook; in nvme_attach()
133 ctrlr->config_hook.ich_arg = ctrlr; in nvme_attach()
135 if (config_intrhook_establish(&ctrlr->config_hook) != 0) in nvme_attach()
144 struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); in nvme_detach() local
146 config_intrhook_drain(&ctrlr->config_hook); in nvme_detach()
148 nvme_ctrlr_destruct(ctrlr, dev); in nvme_detach()
154 struct nvme_controller *ctrlr) in nvme_notify() argument
167 if (!ctrlr->is_initialized) in nvme_notify()
170 cmpset = atomic_cmpset_32(&ctrlr->notification_sent, 0, 1); in nvme_notify()
175 ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); in nvme_notify()
178 ctrlr->cons_cookie[cons->id] = ctrlr_cookie; in nvme_notify()
184 if (ctrlr->is_failed) { in nvme_notify()
185 ctrlr->cons_cookie[cons->id] = NULL; in nvme_notify()
194 for (ns_idx = 0; ns_idx < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); ns_idx++) { in nvme_notify()
195 ns = &ctrlr->ns[ns_idx]; in nvme_notify()
205 nvme_notify_new_controller(struct nvme_controller *ctrlr) in nvme_notify_new_controller() argument
211 nvme_notify(&nvme_consumer[i], ctrlr); in nvme_notify_new_controller()
220 struct nvme_controller *ctrlr; in nvme_notify_new_consumer() local
227 ctrlr = DEVICE2SOFTC(devlist[dev_idx]); in nvme_notify_new_consumer()
228 nvme_notify(cons, ctrlr); in nvme_notify_new_consumer()
235 nvme_notify_async_consumers(struct nvme_controller *ctrlr, in nvme_notify_async_consumers() argument
247 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { in nvme_notify_async_consumers()
255 nvme_notify_fail_consumers(struct nvme_controller *ctrlr) in nvme_notify_fail_consumers() argument
267 if (!ctrlr->is_initialized) in nvme_notify_fail_consumers()
273 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { in nvme_notify_fail_consumers()
274 ctrlr->cons_cookie[i] = NULL; in nvme_notify_fail_consumers()
282 nvme_notify_ns(struct nvme_controller *ctrlr, int nsid) in nvme_notify_ns() argument
291 device_get_nameunit(ctrlr->dev), nsid)); in nvme_notify_ns()
293 if (!ctrlr->is_initialized) in nvme_notify_ns()
296 ns = &ctrlr->ns[nsid - 1]; in nvme_notify_ns()
300 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) in nvme_notify_ns()