From e48d8ff27ad0afe64b503f2bdf5c9135f8a35486 Mon Sep 17 00:00:00 2001 From: Rupert Dance Date: Wed, 22 May 2013 19:16:56 +0300 Subject: [PATCH] Add RHEL6.4 support Signed-off-by: Rupert Dance --- config.mk | 4 ++ makefile | 5 +++ patches/0030-Backports_rhel_6_4.patch | 58 +++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100755 patches/0030-Backports_rhel_6_4.patch diff --git a/config.mk b/config.mk index 6b65701..d55803c 100644 --- 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 diff --git a/makefile b/makefile index c286c6b..2b57434 100644 --- 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 index 0000000..666be1d --- /dev/null +++ b/patches/0030-Backports_rhel_6_4.patch @@ -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 + #include +@@ -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, + -- 2.41.0