Skip to content

Commit

Permalink
linux/efa: SuSE 15.1 support
Browse files Browse the repository at this point in the history
Add support for SuSE 15.1 AMI.

Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
  • Loading branch information
gal-pressman committed Dec 12, 2019
1 parent b0e5698 commit 35b957f
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions kernel/linux/efa/kcompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@
#include <generated/utsrelease.h>
#endif

/******************************************************************************/
/**************************** SuSE macros *************************************/
/******************************************************************************/

/* SuSE version macro is the same as Linux kernel version */
#ifndef SLE_VERSION
#define SLE_VERSION(a,b,c) KERNEL_VERSION(a,b,c)
#endif
#ifdef CONFIG_SUSE_KERNEL
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 14)
#include <linux/suse_version.h>
#define SLE_VERSION_CODE SLE_VERSION(SUSE_VERSION, SUSE_PATCHLEVEL, SUSE_AUXRELEASE)
#endif
#endif /* CONFIG_SUSE_KERNEL */
#ifndef SLE_VERSION_CODE
#define SLE_VERSION_CODE 0
#endif /* SLE_VERSION_CODE */
#ifndef SUSE_VERSION
#define SUSE_VERSION 0
#endif /* SUSE_VERSION */

/******************************************************************************/
/**************************** RHEL macros *************************************/
/******************************************************************************/
Expand Down Expand Up @@ -77,13 +98,15 @@
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || \
(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,7))
(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,7)) || \
(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(15, 1, 0))
#define HAVE_POST_CONST_WR
#define HAVE_MAX_SEND_RCV_SGE
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) || \
(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,7))
(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,7)) || \
(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(15, 1, 0))
#define HAVE_IB_REGISTER_DEVICE_NAME_PARAM
#define HAVE_IB_MODIFY_QP_IS_OK_FOUR_PARAMS
#define HAVE_RDMA_USER_MMAP_IO
Expand Down Expand Up @@ -164,8 +187,9 @@ static inline bool ib_is_udata_cleared(struct ib_udata *udata,
}
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(4,16,0) && \
RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,6)
#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0) || \
(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,6)) || \
(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(15, 1, 0)))
#define IB_QPT_DRIVER 0xFF
#endif

Expand Down

0 comments on commit 35b957f

Please sign in to comment.