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