Lines Matching refs:ctx_ops
55 const struct ntb_ctx_ops *ctx_ops; member
230 if (nc->ctx_ops != NULL && nc->ctx_ops->link_event != NULL) in ntb_link_event()
231 nc->ctx_ops->link_event(nc->ctx); in ntb_link_event()
245 if (nc->ctx_ops != NULL && nc->ctx_ops->db_event != NULL) in ntb_db_event()
246 nc->ctx_ops->db_event(nc->ctx, vec); in ntb_db_event()
325 ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops) in ntb_set_ctx() argument
329 if (ctx == NULL || ctx_ops == NULL) in ntb_set_ctx()
333 if (nc->ctx_ops != NULL) { in ntb_set_ctx()
338 nc->ctx_ops = ctx_ops; in ntb_set_ctx()
344 if (ctx_ops->link_event != NULL) in ntb_set_ctx()
345 ctx_ops->link_event(ctx); in ntb_set_ctx()
352 ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops) in ntb_get_ctx() argument
356 KASSERT(nc->ctx != NULL && nc->ctx_ops != NULL, ("bogus")); in ntb_get_ctx()
357 if (ctx_ops != NULL) in ntb_get_ctx()
358 *ctx_ops = nc->ctx_ops; in ntb_get_ctx()
369 nc->ctx_ops = NULL; in ntb_clear_ctx()