diff options
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4.h | 1 | ||||
-rw-r--r-- | include/linux/mlx4/device.h | 3 |
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index acceb75e8c44..9162a6dd7823 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -2260,6 +2260,22 @@ void mlx4_counter_free(struct mlx4_dev *dev, u32 idx) | |||
2260 | } | 2260 | } |
2261 | EXPORT_SYMBOL_GPL(mlx4_counter_free); | 2261 | EXPORT_SYMBOL_GPL(mlx4_counter_free); |
2262 | 2262 | ||
2263 | void mlx4_set_admin_guid(struct mlx4_dev *dev, __be64 guid, int entry, int port) | ||
2264 | { | ||
2265 | struct mlx4_priv *priv = mlx4_priv(dev); | ||
2266 | |||
2267 | priv->mfunc.master.vf_admin[entry].vport[port].guid = guid; | ||
2268 | } | ||
2269 | EXPORT_SYMBOL_GPL(mlx4_set_admin_guid); | ||
2270 | |||
2271 | __be64 mlx4_get_admin_guid(struct mlx4_dev *dev, int entry, int port) | ||
2272 | { | ||
2273 | struct mlx4_priv *priv = mlx4_priv(dev); | ||
2274 | |||
2275 | return priv->mfunc.master.vf_admin[entry].vport[port].guid; | ||
2276 | } | ||
2277 | EXPORT_SYMBOL_GPL(mlx4_get_admin_guid); | ||
2278 | |||
2263 | static int mlx4_setup_hca(struct mlx4_dev *dev) | 2279 | static int mlx4_setup_hca(struct mlx4_dev *dev) |
2264 | { | 2280 | { |
2265 | struct mlx4_priv *priv = mlx4_priv(dev); | 2281 | struct mlx4_priv *priv = mlx4_priv(dev); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index f30eeb730a86..502d3dd2c888 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h | |||
@@ -499,6 +499,7 @@ struct mlx4_vport_state { | |||
499 | bool spoofchk; | 499 | bool spoofchk; |
500 | u32 link_state; | 500 | u32 link_state; |
501 | u8 qos_vport; | 501 | u8 qos_vport; |
502 | __be64 guid; | ||
502 | }; | 503 | }; |
503 | 504 | ||
504 | struct mlx4_vf_admin_state { | 505 | struct mlx4_vf_admin_state { |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index f9ce34bec45b..39a91b0c5d5c 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -1345,6 +1345,9 @@ int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | |||
1345 | int mlx4_counter_alloc(struct mlx4_dev *dev, u32 *idx); | 1345 | int mlx4_counter_alloc(struct mlx4_dev *dev, u32 *idx); |
1346 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx); | 1346 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx); |
1347 | 1347 | ||
1348 | void mlx4_set_admin_guid(struct mlx4_dev *dev, __be64 guid, int entry, | ||
1349 | int port); | ||
1350 | __be64 mlx4_get_admin_guid(struct mlx4_dev *dev, int entry, int port); | ||
1348 | int mlx4_flow_attach(struct mlx4_dev *dev, | 1351 | int mlx4_flow_attach(struct mlx4_dev *dev, |
1349 | struct mlx4_net_trans_rule *rule, u64 *reg_id); | 1352 | struct mlx4_net_trans_rule *rule, u64 *reg_id); |
1350 | int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id); | 1353 | int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id); |