]> git.openfabrics.org - ~emulex/for-vlad/old/compat-rdma.git/commitdiff
Add RHEL6.4 support
authorRupert Dance <rsdance@soft-forge.com>
Wed, 22 May 2013 16:16:56 +0000 (19:16 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 22 May 2013 16:19:20 +0000 (19:19 +0300)
Signed-off-by: Rupert Dance <rsdance@soft-forge.com>
config.mk
makefile
patches/0030-Backports_rhel_6_4.patch [new file with mode: 0755]

index 6b65701e6f054bc9eae193308275544c95233db4..d55803cde03453d7783adfc192c2628dcf372a89 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -69,3 +69,7 @@ endif
 ifdef CONFIG_COMPAT_RHEL_6_3
  CONFIG_COMPAT_XPRTRDMA_NEEDED=y
 endif
+
+ifdef CONFIG_COMPAT_RHEL_6_4
+ NEED_MIN_DUMP_ALLOC_ARG=y
+endif
index c286c6b60e5f0a399b028fb56fd3936b5c5c380f..2b57434744985946597b2a22059dce1840e58365 100644 (file)
--- a/makefile
+++ b/makefile
@@ -27,6 +27,11 @@ CFLAGS += \
        -DCONFIG_COMPAT_SLES_11_2
 endif
 
+ifneq ($(CONFIG_COMPAT_RHEL_6_4),)
+CFLAGS += \
+       -DCONFIG_COMPAT_RHEL_6_4
+endif
+
 ifneq ($(CONFIG_COMPAT_XPRTRDMA_NEEDED),)
 CFLAGS += \
        -DCONFIG_COMPAT_XPRTRDMA_NEEDED
diff --git a/patches/0030-Backports_rhel_6_4.patch b/patches/0030-Backports_rhel_6_4.patch
new file mode 100755 (executable)
index 0000000..666be1d
--- /dev/null
@@ -0,0 +1,58 @@
+diff -Nrup a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
+--- a/drivers/infiniband/core/netlink.c        2013-02-14 08:47:02.000000000 -0800
++++ b/drivers/infiniband/core/netlink.c        2013-03-05 16:13:24.026999790 -0800
+@@ -30,7 +30,9 @@
+  * SOFTWARE.
+  */
++#ifndef pr_fmt
+ #define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__
++#endif
+ #include <linux/export.h>
+ #include <net/netlink.h>
+@@ -149,7 +151,7 @@ static int ibnl_rcv_msg(struct sk_buff *
+                           !client->cb_table[RDMA_NL_GET_OP(op)].dump)
+                               return -EINVAL;
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
++#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) || CONFIG_COMPAT_RHEL_6_4)
+                       {
+                               struct netlink_dump_control c = {
+                                       .dump = client->cb_table[op].dump,
+@@ -160,7 +162,7 @@ static int ibnl_rcv_msg(struct sk_buff *
+                       return netlink_dump_start(nls, skb, nlh,
+                                                 client->cb_table[op].dump,
+                                                 NULL, 0);
+-#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) */
++#endif /* ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) || CONFIG_COMPAT_RHEL_6_4) */
+               }
+       }
+diff -Nrup a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
+--- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c   2013-02-14 08:47:01.000000000 -0800
++++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c   2013-03-05 16:13:24.026999790 -0800
+@@ -200,6 +200,7 @@ static u8 mlx4_en_dcbnl_setdcbx(struct n
+       return 0;
+ }
++#ifndef CONFIG_COMPAT_RHEL_6_4
+ #define MLX4_RATELIMIT_UNITS_IN_KB 100000 /* rate-limit HW unit in Kbps */
+ static int mlx4_en_dcbnl_ieee_getmaxrate(struct net_device *dev,
+                                  struct ieee_maxrate *maxrate)
+@@ -241,12 +242,15 @@ static int mlx4_en_dcbnl_ieee_setmaxrate
+       return 0;
+ }
++#endif /* CONFIG_COMPAT_RHEL_6_4 */
+ const struct dcbnl_rtnl_ops mlx4_en_dcbnl_ops = {
+       .ieee_getets    = mlx4_en_dcbnl_ieee_getets,
+       .ieee_setets    = mlx4_en_dcbnl_ieee_setets,
++#ifndef CONFIG_COMPAT_RHEL_6_4
+       .ieee_getmaxrate = mlx4_en_dcbnl_ieee_getmaxrate,
+       .ieee_setmaxrate = mlx4_en_dcbnl_ieee_setmaxrate,
++#endif /* CONFIG_COMPAT_RHEL_6_4 */
+       .ieee_getpfc    = mlx4_en_dcbnl_ieee_getpfc,
+       .ieee_setpfc    = mlx4_en_dcbnl_ieee_setpfc,