]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net/mlx5_core: Make the vport helpers available for the IB driver too
authorMajd Dibbiny <majd@mellanox.com>
Thu, 4 Jun 2015 16:30:40 +0000 (19:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2015 23:41:01 +0000 (16:41 -0700)
Move the vport header file to be under include/linux/mlx5, such that
the mlx5 IB can use it as well.

Also add nic_ prefix to the vport NIC commands to differeniate between
HCA vport commands and NIC vport commands.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
include/linux/mlx5/vport.h [moved from drivers/net/ethernet/mellanox/mlx5/core/vport.h with 95% similarity]

index cbb3c7cb53f7a71179b434d9339cb340c2346393..e9edb7210de1c8fb09407a5fa367d093070ca117 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/mlx5/driver.h>
 #include <linux/mlx5/qp.h>
 #include <linux/mlx5/cq.h>
-#include "vport.h"
+#include <linux/mlx5/vport.h>
 #include "wq.h"
 #include "transobj.h"
 #include "mlx5_core.h"
index 1b592913d4d79b7429c2f95578216d1d80904214..edba09cca600ce9a4b412ad9eebcd082da9876de 100644 (file)
@@ -1715,7 +1715,7 @@ static void mlx5e_set_netdev_dev_addr(struct net_device *netdev)
 {
        struct mlx5e_priv *priv = netdev_priv(netdev);
 
-       mlx5_query_vport_mac_address(priv->mdev, netdev->dev_addr);
+       mlx5_query_nic_vport_mac_address(priv->mdev, netdev->dev_addr);
 }
 
 static void mlx5e_build_netdev(struct net_device *netdev)
index ba374b9a6c8758964c628d4967d4ca15458d649c..32c4e03f6d3cce538bf484656ac02b83744cd0cc 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/export.h>
 #include <linux/etherdevice.h>
 #include <linux/mlx5/driver.h>
-#include "vport.h"
+#include <linux/mlx5/vport.h>
 #include "mlx5_core.h"
 
 u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod)
@@ -55,8 +55,9 @@ u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod)
 
        return MLX5_GET(query_vport_state_out, out, state);
 }
+EXPORT_SYMBOL(mlx5_query_vport_state);
 
-void mlx5_query_vport_mac_address(struct mlx5_core_dev *mdev, u8 *addr)
+void mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, u8 *addr)
 {
        u32  in[MLX5_ST_SZ_DW(query_nic_vport_context_in)];
        u32 *out;
@@ -82,3 +83,4 @@ void mlx5_query_vport_mac_address(struct mlx5_core_dev *mdev, u8 *addr)
 
        kvfree(out);
 }
+EXPORT_SYMBOL(mlx5_query_nic_vport_mac_address);
similarity index 95%
rename from drivers/net/ethernet/mellanox/mlx5/core/vport.h
rename to include/linux/mlx5/vport.h
index c05ca2c3419d9a4ffe138f2516b78a22daf19f86..99d0e9f854329ecb2ac6f47cbe5faefb8e2f9fd9 100644 (file)
@@ -36,6 +36,6 @@
 #include <linux/mlx5/driver.h>
 
 u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod);
-void mlx5_query_vport_mac_address(struct mlx5_core_dev *mdev, u8 *addr);
+void mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, u8 *addr);
 
 #endif /* __MLX5_VPORT_H__ */