]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/mlx4e: Don't redefine IB_MTU_XXX enum
authorMark Zhang <markzhang@nvidia.com>
Tue, 17 Jun 2025 08:06:30 +0000 (11:06 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jun 2025 21:17:56 +0000 (14:17 -0700)
Rely on existing IB_MTU_XXX definitions which exist in ib_verbs.h.

Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/382c91ee506e7f1f3c1801957df6b28963484b7d.1750147222.git.leon@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx4/main.c

index febeadfdd5a584943ea1fd5a0b047bf42872506a..03d2fc7d9b09f8293501ecbcec79e55265bd4087 100644 (file)
@@ -49,6 +49,8 @@
 #include <linux/mlx4/device.h>
 #include <linux/mlx4/doorbell.h>
 
+#include <rdma/ib_verbs.h>
+
 #include "mlx4.h"
 #include "fw.h"
 #include "icm.h"
@@ -1246,14 +1248,6 @@ err_out:
        return err ? err : count;
 }
 
-enum ibta_mtu {
-       IB_MTU_256  = 1,
-       IB_MTU_512  = 2,
-       IB_MTU_1024 = 3,
-       IB_MTU_2048 = 4,
-       IB_MTU_4096 = 5
-};
-
 static inline int int_to_ibta_mtu(int mtu)
 {
        switch (mtu) {
@@ -1266,7 +1260,7 @@ static inline int int_to_ibta_mtu(int mtu)
        }
 }
 
-static inline int ibta_mtu_to_int(enum ibta_mtu mtu)
+static inline int ibta_mtu_to_int(enum ib_mtu mtu)
 {
        switch (mtu) {
        case IB_MTU_256:  return  256;