Lines Matching defs:dev_ctx
725 struct mlx5_device_context *dev_ctx;
728 dev_ctx = kzalloc(sizeof(*dev_ctx), GFP_KERNEL);
729 if (!dev_ctx)
732 dev_ctx->intf = intf;
734 dev_ctx->context = intf->add(dev);
737 if (dev_ctx->context) {
739 list_add_tail(&dev_ctx->list, &priv->ctx_list);
742 kfree(dev_ctx);
748 struct mlx5_device_context *dev_ctx;
751 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
752 if (dev_ctx->intf == intf) {
754 list_del(&dev_ctx->list);
757 intf->remove(dev, dev_ctx->context);
758 kfree(dev_ctx);
823 struct mlx5_device_context *dev_ctx;
829 list_for_each_entry(dev_ctx, &mdev->priv.ctx_list, list)
830 if ((dev_ctx->intf->protocol == protocol) &&
831 dev_ctx->intf->get_dev) {
832 result = dev_ctx->intf->get_dev(dev_ctx->context);
1279 struct mlx5_device_context *dev_ctx;
1284 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
1285 if (dev_ctx->intf->event)
1286 dev_ctx->intf->event(dev, dev_ctx->context, event, param);