Added macro for SRP on RHEL7.6
authorVladimir Sokolovsky <vlad@mellanox.com>
Wed, 28 Aug 2019 19:30:15 +0000 (14:30 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 28 Aug 2019 19:30:15 +0000 (14:30 -0500)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4

index fec82c2..f917ad0 100644 (file)
@@ -4443,6 +4443,22 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if scsi_host.h struct scsi_host_template has member max_segment_size])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi_host.h>
+       ],[
+               struct scsi_host_template sh = {
+                       .max_segment_size = 0,
+               };
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SCSI_HOST_TEMPLATE_MAX_SEGMENT_SIZE, 1,
+                       [scsi_host_template has members max_segment_size])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
        AC_MSG_CHECKING([if scsi_tcq.h has function scsi_change_queue_type])
        LB_LINUX_TRY_COMPILE([
                #include <scsi/scsi_tcq.h>