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()
66 if (intf->activate) in mlx4_add_device()
67 intf->activate(&priv->dev, dev_ctx->context); in mlx4_add_device()
73 static void mlx4_remove_device(struct mlx4_interface *intf, struct mlx4_priv *priv) in mlx4_remove_device() argument
78 if (dev_ctx->intf == intf) { in mlx4_remove_device()
83 intf->remove(&priv->dev, dev_ctx->context); in mlx4_remove_device()
89 int mlx4_register_interface(struct mlx4_interface *intf) in mlx4_register_interface() argument
93 if (!intf->add || !intf->remove) in mlx4_register_interface()
98 list_add_tail(&intf->list, &intf_list); in mlx4_register_interface()
100 if (mlx4_is_mfunc(&priv->dev) && (intf->flags & MLX4_INTFF_BONDING)) { in mlx4_register_interface()
102 "SRIOV, disabling HA mode for intf proto %d\n", intf->protocol); in mlx4_register_interface()
103 intf->flags &= ~MLX4_INTFF_BONDING; in mlx4_register_interface()
105 mlx4_add_device(intf, priv); in mlx4_register_interface()
114 void mlx4_unregister_interface(struct mlx4_interface *intf) in mlx4_unregister_interface() argument
121 mlx4_remove_device(intf, priv); in mlx4_unregister_interface()
123 list_del(&intf->list); in mlx4_unregister_interface()
159 if (dev_ctx->intf->flags & MLX4_INTFF_BONDING) { in mlx4_do_bond()
167 dev_ctx->intf->remove(dev, dev_ctx->context); in mlx4_do_bond()
168 dev_ctx->context = dev_ctx->intf->add(dev); in mlx4_do_bond()
175 dev_ctx->intf->protocol, enable ? in mlx4_do_bond()
191 if (dev_ctx->intf->event) in mlx4_dispatch_event()
192 dev_ctx->intf->event(dev, dev_ctx->context, type, param); in mlx4_dispatch_event()
200 struct mlx4_interface *intf; in mlx4_register_device() local
206 list_for_each_entry(intf, &intf_list, list) in mlx4_register_device()
207 mlx4_add_device(intf, priv); in mlx4_register_device()
218 struct mlx4_interface *intf; in mlx4_unregister_device() local
223 list_for_each_entry(intf, &intf_list, list) in mlx4_unregister_device()
224 mlx4_remove_device(intf, priv); in mlx4_unregister_device()
242 if (dev_ctx->intf->protocol == proto && dev_ctx->intf->get_dev) { in mlx4_get_protocol_dev()
243 result = dev_ctx->intf->get_dev(dev, dev_ctx->context, port); in mlx4_get_protocol_dev()