summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dc8fb06)
distributions but must be installed separately via the OFED package. The patch
below makes it easier to compile SCST-SRPT with the OFED kernel headers by
disabling the backported <linux/scatterlist.h> macro's when compiling with
OFED kernel headers. OFED namely has its own set of backported macro's. OFED
kernel headers are detected via the preprocessor symbol
__BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__, which is defined in the OFED
header file <linux/scatterlist.h> only. This patch does not have any effect
when compiling SCST on a system where OFED has not been installed.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@824
d57e44dd-8a1f-0410-8b47-
8ef2f437770f
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
+/*
+ * The macro's sg_page(), sg_virt(), sg_init_table(), sg_assign_page() and
+ * sg_set_page() have been introduced in the 2.6.24 kernel. The definitions
+ * below are backports of the 2.6.24 macro's for older kernels. There is one
+ * exception however: when compiling SCST on a system with a pre-2.6.24 kernel
+ * (e.g. RHEL 5.x) where the OFED kernel headers have been installed, do not
+ * define the backported macro's because OFED has already defined these.
+ */
+
+#ifndef __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__
+
static inline struct page *sg_page(struct scatterlist *sg)
{
return sg->page;
static inline struct page *sg_page(struct scatterlist *sg)
{
return sg->page;
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) */
static inline void sg_clear(struct scatterlist *sg)
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) */
static inline void sg_clear(struct scatterlist *sg)