]> git.openfabrics.org - ~aditr/compat.git/commitdiff
Added macros required for IB_SRP backport
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 5 Dec 2016 16:27:42 +0000 (18:27 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 5 Dec 2016 16:28:01 +0000 (18:28 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4

index f4b1bb90e131e4b5762161b8a88371a68bb282b8..266d53a2d6d3d4b27b11d7d88d0d91d93342d95f 100644 (file)
@@ -3734,6 +3734,112 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if blk-mq.h has blk_mq_unique_tag])
+       LB_LINUX_TRY_COMPILE([
+               #include <blk-mq.h>
+       ],[
+               blk_mq_unique_tag(NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_BLK_MQ_UNIQUE_TAG, 1,
+                               [blk_mq_unique_tag exist])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if blk_queue_virt_boundary exist])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/blkdev.h>
+       ],[
+               blk_queue_virt_boundary(NULL, 0);
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_BLK_QUEUE_VIRT_BOUNDARY, 1,
+                               [blk_queue_virt_boundary exist])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if scsi_device.h has scsi_change_queue_depth])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi_device.h>
+       ],[
+               scsi_change_queue_depth(NULL, 0);
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SCSCI_CHANGE_QUEUE_DEPTH, 1,
+                       [scsi_change_queue_depth exist])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if scsi_host.h struct Scsi_Host has member nr_hw_queues])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi_host.h>
+       ],[
+               struct Scsi_Host sh = {
+                       .nr_hw_queues = 0,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SCSI_HOST_NR_HW_QUEUES, 1,
+                               [Scsi_Host has members nr_hw_queues])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if scsi_host.h struct scsi_host_template has member track_queue_depth])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi_host.h>
+       ],[
+               struct scsi_host_template sh = {
+                       .track_queue_depth = 0,
+               };
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SCSI_HOST_TEMPLATE_TRACK_QUEUE_DEPTH, 1,
+                       [scsi_host_template has members track_queue_depth])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if scsi_device.h has SCSI_SCAN_INITIAL])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi_device.h>
+       ],[
+               int x = SCSI_SCAN_INITIAL;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SCSI_SCAN_INITIAL, 1,
+                         [SCSI_SCAN_INITIAL is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if scsi.h has SG_MAX_SEGMENTS])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi.h>
+       ],[
+               int x = SG_MAX_SEGMENTS;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SG_MAX_SEGMENTS, 1,
+                         [SG_MAX_SEGMENTS is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS