Lines Matching defs:ctx_ops
54 const struct ntb_ctx_ops *ctx_ops;
229 if (nc->ctx_ops != NULL && nc->ctx_ops->link_event != NULL)
230 nc->ctx_ops->link_event(nc->ctx);
244 if (nc->ctx_ops != NULL && nc->ctx_ops->db_event != NULL)
245 nc->ctx_ops->db_event(nc->ctx, vec);
324 ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops)
328 if (ctx == NULL || ctx_ops == NULL)
332 if (nc->ctx_ops != NULL) {
337 nc->ctx_ops = ctx_ops;
343 if (ctx_ops->link_event != NULL)
344 ctx_ops->link_event(ctx);
351 ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops)
355 KASSERT(nc->ctx != NULL && nc->ctx_ops != NULL, ("bogus"));
356 if (ctx_ops != NULL)
357 *ctx_ops = nc->ctx_ops;
368 nc->ctx_ops = NULL;