Correct usage of kmem_cache_create() function for kernel version below
2.6.22 and fix for __memcpy() on ARM.
--- open-fcoe-target.orig/openfctgt/openfc_pkt.c
+++ open-fcoe-target/openfctgt/openfc_pkt.c
@@ -161,7 +161,11 @@ int openfc_create_scsi_slab(void)
openfc_scsi_pkt_cachep =
kmem_cache_create(scsi_pkt_cachep_name,
sizeof(struct fc_scsi_pkt), 0,
SLAB_HWCACHE_ALIGN,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)
NULL);
+#else
+ NULL, NULL);
+#endif
if (openfc_scsi_pkt_cachep == NULL) {
SA_LOG("Unable to allocate SRB cache...module load
failed!");
--- open-fcoe-target.orig/openfctgt/openfc_scst.c
+++ open-fcoe-target/openfctgt/openfc_scst.c
@@ -74,6 +74,11 @@
#include "fc_encaps.h"
#include "fc_sess.h"
+
+#ifdef CONFIG_ARM
+#define __memcpy memcpy
+#endif
+
/*
* function prototypes
* FC scsi I/O related functions
--- open-fcoe-target.orig/openfc/openfc_scsi.c
+++ open-fcoe-target/openfc/openfc_scsi.c
@@ -52,6 +52,13 @@
int openfc_debug;
+
+#ifdef CONFIG_ARM
+#define __memcpy memcpy
+#endif
+
+
+
/*
* function prototypes
* FC scsi I/O related functions
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel