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
This commit is contained in:
Bart Van Assche
2011-06-02 18:21:39 +00:00
parent 1395c41108
commit ea8e30581e

View File

@@ -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);