aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/mlx4.h
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2008-10-22 18:38:42 -0400
committerRoland Dreier <rolandd@cisco.com>2008-10-22 18:38:42 -0400
commit7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5 (patch)
tree4b38e1ead8b27a480cc766f6927dccf5b63793ae /drivers/net/mlx4/mlx4.h
parent2a2336f8228292b8197f4187e54b0748903e6645 (diff)
mlx4_core: Multiple port type support
Multi-protocol adapters support different port types. Each consumer of mlx4_core queries for supported port types; in particular mlx4_ib can no longer assume that all physical ports belong to it. Port type is configured through a sysfs interface. When the type of a port is changed, all mlx4 interfaces are unregistered, and then registered again with the new port types. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.h')
-rw-r--r--drivers/net/mlx4/mlx4.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index 23309f381ee..fa431fad0ee 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -277,6 +277,9 @@ struct mlx4_vlan_table {
277struct mlx4_port_info { 277struct mlx4_port_info {
278 struct mlx4_dev *dev; 278 struct mlx4_dev *dev;
279 int port; 279 int port;
280 char dev_name[16];
281 struct device_attribute port_attr;
282 enum mlx4_port_type tmp_type;
280 struct mlx4_mac_table mac_table; 283 struct mlx4_mac_table mac_table;
281 struct mlx4_vlan_table vlan_table; 284 struct mlx4_vlan_table vlan_table;
282}; 285};
@@ -310,6 +313,7 @@ struct mlx4_priv {
310 struct mlx4_uar driver_uar; 313 struct mlx4_uar driver_uar;
311 void __iomem *kar; 314 void __iomem *kar;
312 struct mlx4_port_info port[MLX4_MAX_PORTS + 1]; 315 struct mlx4_port_info port[MLX4_MAX_PORTS + 1];
316 struct mutex port_mutex;
313}; 317};
314 318
315static inline struct mlx4_priv *mlx4_priv(struct mlx4_dev *dev) 319static inline struct mlx4_priv *mlx4_priv(struct mlx4_dev *dev)
@@ -383,4 +387,6 @@ void mlx4_handle_catas_err(struct mlx4_dev *dev);
383void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table); 387void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table);
384void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table); 388void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table);
385 389
390int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port);
391
386#endif /* MLX4_H */ 392#endif /* MLX4_H */