From 2bec069a88cc29371e52b0d54715ac6987c562c5 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Mon, 5 Dec 2016 18:27:42 +0200 Subject: [PATCH] Added macros required for IB_SRP backport Signed-off-by: Vladimir Sokolovsky --- config/rdma.m4 | 106 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/config/rdma.m4 b/config/rdma.m4 index f4b1bb9..266d53a 100644 --- a/config/rdma.m4 +++ b/config/rdma.m4 @@ -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_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 + ],[ + 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_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 + ],[ + 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 + ],[ + 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 + ],[ + 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 + ],[ + 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 -- 2.41.0