aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@mellanox.com>2015-04-02 10:07:34 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-02 16:33:43 -0400
commit64613d9499c4887485d4350387919ea507330d90 (patch)
tree6b1186f8509add5e36e87122813b53c86ab6987a /include/linux/mlx5
parentce0f75093282c5dca1e79ae3e3e893deaea86166 (diff)
net/mlx5_core: Extend struct mlx5_interface to support multiple protocols
Preparation for ethernet driver. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r--include/linux/mlx5/driver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index f250f6580dad..9a90e7523dc2 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -781,14 +781,22 @@ enum {
781 MAX_MR_CACHE_ENTRIES = 16, 781 MAX_MR_CACHE_ENTRIES = 16,
782}; 782};
783 783
784enum {
785 MLX5_INTERFACE_PROTOCOL_IB = 0,
786 MLX5_INTERFACE_PROTOCOL_ETH = 1,
787};
788
784struct mlx5_interface { 789struct mlx5_interface {
785 void * (*add)(struct mlx5_core_dev *dev); 790 void * (*add)(struct mlx5_core_dev *dev);
786 void (*remove)(struct mlx5_core_dev *dev, void *context); 791 void (*remove)(struct mlx5_core_dev *dev, void *context);
787 void (*event)(struct mlx5_core_dev *dev, void *context, 792 void (*event)(struct mlx5_core_dev *dev, void *context,
788 enum mlx5_dev_event event, unsigned long param); 793 enum mlx5_dev_event event, unsigned long param);
794 void * (*get_dev)(void *context);
795 int protocol;
789 struct list_head list; 796 struct list_head list;
790}; 797};
791 798
799void *mlx5_get_protocol_dev(struct mlx5_core_dev *mdev, int protocol);
792int mlx5_register_interface(struct mlx5_interface *intf); 800int mlx5_register_interface(struct mlx5_interface *intf);
793void mlx5_unregister_interface(struct mlx5_interface *intf); 801void mlx5_unregister_interface(struct mlx5_interface *intf);
794 802