diff options
Diffstat (limited to 'include/linux/mlx4/driver.h')
| -rw-r--r-- | include/linux/mlx4/driver.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index 022055c8fb26..9553a73d2049 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -49,6 +49,10 @@ enum mlx4_dev_event { | |||
| 49 | MLX4_DEV_EVENT_SLAVE_SHUTDOWN, | 49 | MLX4_DEV_EVENT_SLAVE_SHUTDOWN, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | enum { | ||
| 53 | MLX4_INTFF_BONDING = 1 << 0 | ||
| 54 | }; | ||
| 55 | |||
| 52 | struct mlx4_interface { | 56 | struct mlx4_interface { |
| 53 | void * (*add) (struct mlx4_dev *dev); | 57 | void * (*add) (struct mlx4_dev *dev); |
| 54 | void (*remove)(struct mlx4_dev *dev, void *context); | 58 | void (*remove)(struct mlx4_dev *dev, void *context); |
| @@ -57,11 +61,26 @@ struct mlx4_interface { | |||
| 57 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); | 61 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); |
| 58 | struct list_head list; | 62 | struct list_head list; |
| 59 | enum mlx4_protocol protocol; | 63 | enum mlx4_protocol protocol; |
| 64 | int flags; | ||
| 60 | }; | 65 | }; |
| 61 | 66 | ||
| 62 | int mlx4_register_interface(struct mlx4_interface *intf); | 67 | int mlx4_register_interface(struct mlx4_interface *intf); |
| 63 | void mlx4_unregister_interface(struct mlx4_interface *intf); | 68 | void mlx4_unregister_interface(struct mlx4_interface *intf); |
| 64 | 69 | ||
| 70 | int mlx4_bond(struct mlx4_dev *dev); | ||
| 71 | int mlx4_unbond(struct mlx4_dev *dev); | ||
| 72 | static inline int mlx4_is_bonded(struct mlx4_dev *dev) | ||
| 73 | { | ||
| 74 | return !!(dev->flags & MLX4_FLAG_BONDED); | ||
| 75 | } | ||
| 76 | |||
| 77 | struct mlx4_port_map { | ||
| 78 | u8 port1; | ||
| 79 | u8 port2; | ||
| 80 | }; | ||
| 81 | |||
| 82 | int mlx4_port_map_set(struct mlx4_dev *dev, struct mlx4_port_map *v2p); | ||
| 83 | |||
| 65 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); | 84 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); |
| 66 | 85 | ||
| 67 | static inline u64 mlx4_mac_to_u64(u8 *addr) | 86 | static inline u64 mlx4_mac_to_u64(u8 *addr) |
