]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
Added support for iSERT on RHEL7.6
authorVladimir Sokolovsky <vlad@mellanox.com>
Wed, 28 Aug 2019 19:00:53 +0000 (14:00 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 28 Aug 2019 19:00:53 +0000 (14:00 -0500)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4
include/linux/compat-2.6.h
include/linux/compat-5.1.h [new file with mode: 0644]

index 2b77c3cb646e1655b5bedfc219098108d4705fa9..fec82c29e0a3cca5979159e9835446f671b2d06c 100644 (file)
@@ -4281,7 +4281,7 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
-    AC_MSG_CHECKING([if iscsi_transport.h struct iscsit_transport has member iscsit_get_sup_prot_ops])
+       AC_MSG_CHECKING([if iscsi_transport.h struct iscsit_transport has member iscsit_get_sup_prot_ops])
        LB_LINUX_TRY_COMPILE([
                #include <target/iscsi/iscsi_transport.h>
 
@@ -4304,6 +4304,21 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if iscsi_transport.h has iscsit_set_unsolicited_dataout])
+       LB_LINUX_TRY_COMPILE([
+               #include <target/iscsi/iscsi_transport.h>
+
+               iscsit_set_unsolicited_dataout(NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_ISCSIT_SET_UNSOLICITED_DATAOUT, 1,
+                       [iscsi_transport.h  has iscsit_set_unsolicited_dataout])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
        AC_MSG_CHECKING([if highmem.h has kmap_atomic function with km_type])
        LB_LINUX_TRY_COMPILE([
                #include <linux/highmem.h>
index bc4a1b15d797adc6ef272475423cac3b3c71c744..1a46957d32e9ada8c9a7f0a7c20be969575d5471 100644 (file)
@@ -60,6 +60,7 @@ void backport_dependency_symbol(void);
 #include <linux/compat-4.11.h>
 #include <linux/compat-4.16.h>
 #include <linux/compat-4.17.h>
+#include <linux/compat-5.1.h>
 #include <linux/compat-5.3.h>
 
 #endif /* CONFIG_COMPAT_RDMA */
diff --git a/include/linux/compat-5.1.h b/include/linux/compat-5.1.h
new file mode 100644 (file)
index 0000000..07239d1
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef LINUX_5_1_COMPAT_H
+#define LINUX_5_1_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0))
+
+#ifndef HAVE_ISCSIT_SET_UNSOLICITED_DATAOUT
+#define iscsit_set_unsolicited_dataout iscsit_set_unsoliticed_dataout
+#endif
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)) */
+
+#endif /* LINUX_5_1_COMPAT_H */