Lines Matching refs:ctx_ops
57 const struct ntb_ctx_ops *ctx_ops; member
233 if (nc->ctx_ops != NULL && nc->ctx_ops->link_event != NULL) in ntb_link_event()
234 nc->ctx_ops->link_event(nc->ctx); in ntb_link_event()
248 if (nc->ctx_ops != NULL && nc->ctx_ops->db_event != NULL) in ntb_db_event()
249 nc->ctx_ops->db_event(nc->ctx, vec); in ntb_db_event()
328 ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops) in ntb_set_ctx() argument
332 if (ctx == NULL || ctx_ops == NULL) in ntb_set_ctx()
336 if (nc->ctx_ops != NULL) { in ntb_set_ctx()
341 nc->ctx_ops = ctx_ops; in ntb_set_ctx()
347 if (ctx_ops->link_event != NULL) in ntb_set_ctx()
348 ctx_ops->link_event(ctx); in ntb_set_ctx()
355 ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops) in ntb_get_ctx() argument
359 KASSERT(nc->ctx != NULL && nc->ctx_ops != NULL, ("bogus")); in ntb_get_ctx()
360 if (ctx_ops != NULL) in ntb_get_ctx()
361 *ctx_ops = nc->ctx_ops; in ntb_get_ctx()
372 nc->ctx_ops = NULL; in ntb_clear_ctx()