Lines Matching refs:ctrlr

85 	struct nvme_controller	*ctrlr;  in nvme_shutdown()  local
87 ctrlr = DEVICE2SOFTC(dev); in nvme_shutdown()
88 nvme_ctrlr_shutdown(ctrlr); in nvme_shutdown()
129 struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); in nvme_attach() local
132 status = nvme_ctrlr_construct(ctrlr, dev); in nvme_attach()
135 nvme_ctrlr_destruct(ctrlr, dev); in nvme_attach()
145 status = nvme_ctrlr_hw_reset(ctrlr); in nvme_attach()
147 nvme_ctrlr_destruct(ctrlr, dev); in nvme_attach()
151 status = nvme_ctrlr_hw_reset(ctrlr); in nvme_attach()
153 nvme_ctrlr_destruct(ctrlr, dev); in nvme_attach()
157 ctrlr->config_hook.ich_func = nvme_ctrlr_start_config_hook; in nvme_attach()
158 ctrlr->config_hook.ich_arg = ctrlr; in nvme_attach()
160 config_intrhook_establish(&ctrlr->config_hook); in nvme_attach()
168 struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); in nvme_detach() local
170 nvme_ctrlr_destruct(ctrlr, dev); in nvme_detach()
176 struct nvme_controller *ctrlr) in nvme_notify() argument
189 if (!ctrlr->is_initialized) in nvme_notify()
192 cmpset = atomic_cmpset_32(&ctrlr->notification_sent, 0, 1); in nvme_notify()
197 ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); in nvme_notify()
200 ctrlr->cons_cookie[cons->id] = ctrlr_cookie; in nvme_notify()
206 if (ctrlr->is_failed) { in nvme_notify()
207 ctrlr->cons_cookie[cons->id] = NULL; in nvme_notify()
216 for (ns_idx = 0; ns_idx < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); ns_idx++) { in nvme_notify()
217 ns = &ctrlr->ns[ns_idx]; in nvme_notify()
227 nvme_notify_new_controller(struct nvme_controller *ctrlr) in nvme_notify_new_controller() argument
233 nvme_notify(&nvme_consumer[i], ctrlr); in nvme_notify_new_controller()
242 struct nvme_controller *ctrlr; in nvme_notify_new_consumer() local
249 ctrlr = DEVICE2SOFTC(devlist[dev_idx]); in nvme_notify_new_consumer()
250 nvme_notify(cons, ctrlr); in nvme_notify_new_consumer()
257 nvme_notify_async_consumers(struct nvme_controller *ctrlr, in nvme_notify_async_consumers() argument
269 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { in nvme_notify_async_consumers()
277 nvme_notify_fail_consumers(struct nvme_controller *ctrlr) in nvme_notify_fail_consumers() argument
289 if (!ctrlr->is_initialized) in nvme_notify_fail_consumers()
295 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { in nvme_notify_fail_consumers()
296 ctrlr->cons_cookie[i] = NULL; in nvme_notify_fail_consumers()
304 nvme_notify_ns(struct nvme_controller *ctrlr, int nsid) in nvme_notify_ns() argument
307 struct nvme_namespace *ns = &ctrlr->ns[nsid - 1]; in nvme_notify_ns()
311 if (!ctrlr->is_initialized) in nvme_notify_ns()
317 (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) in nvme_notify_ns()