From: Steve Wise Date: Thu, 8 Jan 2015 19:54:32 +0000 (-0600) Subject: iw_cm: add sles11sp3 backport X-Git-Tag: vofed-3.18~51 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b548bd906b067358d5184d25e3172cf35d711318;p=~emulex%2Ffor-vlad%2Fcompat-rdma.git iw_cm: add sles11sp3 backport Signed-off-by: Steve Wise --- diff --git a/patches/0024-BACKPORT-iw_cm.patch b/patches/0024-BACKPORT-iw_cm.patch new file mode 100644 index 0000000..6228763 --- /dev/null +++ b/patches/0024-BACKPORT-iw_cm.patch @@ -0,0 +1,68 @@ +From: Steve Wise +Subject: [PATCH] BACKPORT: iw_cm + +Signed-off-by: Steve Wise +--- + drivers/infiniband/core/iwcm.c | 21 +++++++++++++++++++++ + 1 files changed, 21 insertions(+), 0 deletions(-) + +diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c +index xxxxxxx..xxxxxxx xxxxxx +--- a/drivers/infiniband/core/iwcm.c ++++ b/drivers/infiniband/core/iwcm.c +@@ -68,6 +68,7 @@ struct iwcm_work { + + static unsigned int default_backlog = 256; + ++#ifndef CONFIG_SYSCTL_SYSCALL_CHECK + static struct ctl_table_header *iwcm_ctl_table_hdr; + static struct ctl_table iwcm_ctl_table[] = { + { +@@ -79,6 +80,14 @@ static struct ctl_table iwcm_ctl_table[] = { + }, + { } + }; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) ++static struct ctl_path iwcm_ctl_path[] = { ++ { .procname = "net" }, ++ { .procname = "iw_cm" }, ++ { } ++}; ++#endif ++#endif + + /* + * The following services provide a mechanism for pre-allocating iwcm_work +@@ -1048,20 +1057,32 @@ static int __init iw_cm_init(void) + if (!iwcm_wq) + return -ENOMEM; + ++#ifndef CONFIG_SYSCTL_SYSCALL_CHECK ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) + iwcm_ctl_table_hdr = register_net_sysctl(&init_net, "net/iw_cm", + iwcm_ctl_table); ++#else ++ iwcm_ctl_table_hdr = register_sysctl_paths(iwcm_ctl_path, iwcm_ctl_table); ++#endif + if (!iwcm_ctl_table_hdr) { + pr_err("iw_cm: couldn't register sysctl paths\n"); + destroy_workqueue(iwcm_wq); + return -ENOMEM; + } ++#endif + + return 0; + } + + static void __exit iw_cm_cleanup(void) + { ++#ifndef CONFIG_SYSCTL_SYSCALL_CHECK ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) + unregister_net_sysctl_table(iwcm_ctl_table_hdr); ++#else ++ unregister_net_table(iwcm_ctl_table_hdr); ++#endif ++#endif + destroy_workqueue(iwcm_wq); + } +