Lines Matching refs:cons
115 nvme_notify(struct nvme_consumer *cons, in nvme_notify() argument
136 if (cons->ctrlr_fn != NULL) in nvme_notify()
137 ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); in nvme_notify()
140 ctrlr->cons_cookie[cons->id] = ctrlr_cookie; in nvme_notify()
149 ctrlr->cons_cookie[cons->id] = NULL; in nvme_notify()
150 if (cons->fail_fn != NULL) in nvme_notify()
151 (*cons->fail_fn)(ctrlr_cookie); in nvme_notify()
162 if (cons->ns_fn != NULL) in nvme_notify()
163 ns->cons_cookie[cons->id] = in nvme_notify()
164 (*cons->ns_fn)(ns, ctrlr_cookie); in nvme_notify()
181 nvme_notify_new_consumer(struct nvme_consumer *cons) in nvme_notify_new_consumer() argument
192 nvme_notify(cons, ctrlr); in nvme_notify_new_consumer()
204 struct nvme_consumer *cons; in nvme_notify_async_consumers() local
209 cons = &nvme_consumer[i]; in nvme_notify_async_consumers()
210 if (cons->id != INVALID_CONSUMER_ID && cons->async_fn != NULL && in nvme_notify_async_consumers()
212 (*cons->async_fn)(ctrlr_cookie, async_cpl, in nvme_notify_async_consumers()
221 struct nvme_consumer *cons; in nvme_notify_fail_consumers() local
235 cons = &nvme_consumer[i]; in nvme_notify_fail_consumers()
236 if (cons->id != INVALID_CONSUMER_ID && in nvme_notify_fail_consumers()
239 if (cons->fail_fn != NULL) in nvme_notify_fail_consumers()
240 cons->fail_fn(ctrlr_cookie); in nvme_notify_fail_consumers()
248 struct nvme_consumer *cons; in nvme_notify_ns() local
262 cons = &nvme_consumer[i]; in nvme_notify_ns()
263 if (cons->id != INVALID_CONSUMER_ID && cons->ns_fn != NULL && in nvme_notify_ns()
265 ns->cons_cookie[i] = (*cons->ns_fn)(ns, ctrlr_cookie); in nvme_notify_ns()