Lines Matching refs:intf

44 	struct mlx4_interface  *intf;  member
52 static void mlx4_add_device(struct mlx4_interface *intf, struct mlx4_priv *priv) in mlx4_add_device() argument
60 dev_ctx->intf = intf; in mlx4_add_device()
61 dev_ctx->context = intf->add(&priv->dev); in mlx4_add_device()
67 if (intf->activate) in mlx4_add_device()
68 intf->activate(&priv->dev, dev_ctx->context); in mlx4_add_device()
74 static void mlx4_remove_device(struct mlx4_interface *intf, struct mlx4_priv *priv) in mlx4_remove_device() argument
79 if (dev_ctx->intf == intf) { in mlx4_remove_device()
84 intf->remove(&priv->dev, dev_ctx->context); in mlx4_remove_device()
90 int mlx4_register_interface(struct mlx4_interface *intf) in mlx4_register_interface() argument
94 if (!intf->add || !intf->remove) in mlx4_register_interface()
99 list_add_tail(&intf->list, &intf_list); in mlx4_register_interface()
101 if (mlx4_is_mfunc(&priv->dev) && (intf->flags & MLX4_INTFF_BONDING)) { in mlx4_register_interface()
103 "SRIOV, disabling HA mode for intf proto %d\n", intf->protocol); in mlx4_register_interface()
104 intf->flags &= ~MLX4_INTFF_BONDING; in mlx4_register_interface()
106 mlx4_add_device(intf, priv); in mlx4_register_interface()
115 void mlx4_unregister_interface(struct mlx4_interface *intf) in mlx4_unregister_interface() argument
122 mlx4_remove_device(intf, priv); in mlx4_unregister_interface()
124 list_del(&intf->list); in mlx4_unregister_interface()
160 if (dev_ctx->intf->flags & MLX4_INTFF_BONDING) { in mlx4_do_bond()
168 dev_ctx->intf->remove(dev, dev_ctx->context); in mlx4_do_bond()
169 dev_ctx->context = dev_ctx->intf->add(dev); in mlx4_do_bond()
176 dev_ctx->intf->protocol, enable ? in mlx4_do_bond()
192 if (dev_ctx->intf->event) in mlx4_dispatch_event()
193 dev_ctx->intf->event(dev, dev_ctx->context, type, param); in mlx4_dispatch_event()
201 struct mlx4_interface *intf; in mlx4_register_device() local
207 list_for_each_entry(intf, &intf_list, list) in mlx4_register_device()
208 mlx4_add_device(intf, priv); in mlx4_register_device()
219 struct mlx4_interface *intf; in mlx4_unregister_device() local
239 list_for_each_entry(intf, &intf_list, list) in mlx4_unregister_device()
240 mlx4_remove_device(intf, priv); in mlx4_unregister_device()
258 if (dev_ctx->intf->protocol == proto && dev_ctx->intf->get_dev) { in mlx4_get_protocol_dev()
259 result = dev_ctx->intf->get_dev(dev, dev_ctx->context, port); in mlx4_get_protocol_dev()