Lines Matching refs:dev_ctx

53 	struct mlx4_device_context *dev_ctx;  in mlx4_add_device()  local
55 dev_ctx = kmalloc(sizeof *dev_ctx, GFP_KERNEL); in mlx4_add_device()
56 if (!dev_ctx) in mlx4_add_device()
59 dev_ctx->intf = intf; in mlx4_add_device()
60 dev_ctx->context = intf->add(&priv->dev); in mlx4_add_device()
62 if (dev_ctx->context) { in mlx4_add_device()
64 list_add_tail(&dev_ctx->list, &priv->ctx_list); in mlx4_add_device()
67 kfree(dev_ctx); in mlx4_add_device()
72 struct mlx4_device_context *dev_ctx; in mlx4_remove_device() local
74 list_for_each_entry(dev_ctx, &priv->ctx_list, list) in mlx4_remove_device()
75 if (dev_ctx->intf == intf) { in mlx4_remove_device()
77 list_del(&dev_ctx->list); in mlx4_remove_device()
80 intf->remove(&priv->dev, dev_ctx->context); in mlx4_remove_device()
81 kfree(dev_ctx); in mlx4_remove_device()
129 struct mlx4_device_context *dev_ctx = NULL, *temp_dev_ctx; in mlx4_do_bond() local
155 list_for_each_entry_safe(dev_ctx, temp_dev_ctx, &priv->ctx_list, list) { in mlx4_do_bond()
156 if (dev_ctx->intf->flags & MLX4_INTFF_BONDING) { in mlx4_do_bond()
157 list_add_tail(&dev_ctx->bond_list, &bond_list); in mlx4_do_bond()
158 list_del(&dev_ctx->list); in mlx4_do_bond()
163 list_for_each_entry(dev_ctx, &bond_list, bond_list) { in mlx4_do_bond()
164 dev_ctx->intf->remove(dev, dev_ctx->context); in mlx4_do_bond()
165 dev_ctx->context = dev_ctx->intf->add(dev); in mlx4_do_bond()
168 list_add_tail(&dev_ctx->list, &priv->ctx_list); in mlx4_do_bond()
172 dev_ctx->intf->protocol, enable ? in mlx4_do_bond()
182 struct mlx4_device_context *dev_ctx; in mlx4_dispatch_event() local
187 list_for_each_entry(dev_ctx, &priv->ctx_list, list) in mlx4_dispatch_event()
188 if (dev_ctx->intf->event) in mlx4_dispatch_event()
189 dev_ctx->intf->event(dev, dev_ctx->context, type, param); in mlx4_dispatch_event()
232 struct mlx4_device_context *dev_ctx; in mlx4_get_protocol_dev() local
238 list_for_each_entry(dev_ctx, &priv->ctx_list, list) in mlx4_get_protocol_dev()
239 if (dev_ctx->intf->protocol == proto && dev_ctx->intf->get_dev) { in mlx4_get_protocol_dev()
240 result = dev_ctx->intf->get_dev(dev, dev_ctx->context, port); in mlx4_get_protocol_dev()