Lines Matching refs:intf
43 struct mlx4_interface *intf; member
51 static void mlx4_add_device(struct mlx4_interface *intf, struct mlx4_priv *priv) in mlx4_add_device() argument
59 dev_ctx->intf = intf; in mlx4_add_device()
60 dev_ctx->context = intf->add(&priv->dev); in mlx4_add_device()
70 static void mlx4_remove_device(struct mlx4_interface *intf, struct mlx4_priv *priv) in mlx4_remove_device() argument
75 if (dev_ctx->intf == intf) { in mlx4_remove_device()
80 intf->remove(&priv->dev, dev_ctx->context); in mlx4_remove_device()
86 int mlx4_register_interface(struct mlx4_interface *intf) in mlx4_register_interface() argument
90 if (!intf->add || !intf->remove) in mlx4_register_interface()
95 list_add_tail(&intf->list, &intf_list); in mlx4_register_interface()
97 if (mlx4_is_mfunc(&priv->dev) && (intf->flags & MLX4_INTFF_BONDING)) { in mlx4_register_interface()
99 "SRIOV, disabling HA mode for intf proto %d\n", intf->protocol); in mlx4_register_interface()
100 intf->flags &= ~MLX4_INTFF_BONDING; in mlx4_register_interface()
102 mlx4_add_device(intf, priv); in mlx4_register_interface()
111 void mlx4_unregister_interface(struct mlx4_interface *intf) in mlx4_unregister_interface() argument
118 mlx4_remove_device(intf, priv); in mlx4_unregister_interface()
120 list_del(&intf->list); in mlx4_unregister_interface()
156 if (dev_ctx->intf->flags & MLX4_INTFF_BONDING) { 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()
172 dev_ctx->intf->protocol, enable ? in mlx4_do_bond()
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()
197 struct mlx4_interface *intf; in mlx4_register_device() local
203 list_for_each_entry(intf, &intf_list, list) in mlx4_register_device()
204 mlx4_add_device(intf, priv); in mlx4_register_device()
215 struct mlx4_interface *intf; in mlx4_unregister_device() local
220 list_for_each_entry(intf, &intf_list, list) in mlx4_unregister_device()
221 mlx4_remove_device(intf, priv); in mlx4_unregister_device()
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()