From ea8e30581ef2637ca3e7d4dca9c90efaa2c8bad2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 2 Jun 2011 18:21:39 +0000 Subject: [PATCH] Made ib_srpt build with OFED 1.5.3.1. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3519 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index b28009cff..e502c8f82 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -72,7 +72,7 @@ typedef _Bool bool; #include "scst_sgv.h" #endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) && !defined(BACKPORT_LINUX_CPUMASK_H) #define nr_cpu_ids NR_CPUS #endif @@ -3554,8 +3554,6 @@ void scst_aen_done(struct scst_aen *aen); * define the backported macro's because OFED has already defined these. */ -#ifndef __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__ - static inline bool sg_is_chain(struct scatterlist *sg) { return false; @@ -3566,16 +3564,20 @@ static inline struct scatterlist *sg_chain_ptr(struct scatterlist *sg) return NULL; } +#ifndef sg_page static inline struct page *sg_page(struct scatterlist *sg) { return sg->page; } +#endif static inline void *sg_virt(struct scatterlist *sg) { return page_address(sg_page(sg)) + sg->offset; } +#ifndef __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__ + static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) { memset(sgl, 0, sizeof(*sgl) * nents);