Patch for vhba-module to work with kernel >= 2.6.23
This is my patch to make vhba-module compiled with kernel
>= 2.6.23 with commit
18dabf473e15850c0dbc8ff13ac1e2806d542c15
If you got error like:
error: 'struct scatterlist' has no member named 'page'
then this patch is for you.
Tested with kernel 2.6.24-rc4 on x86_64 arch [code]
--- vhba-module-1.0.0/vhba.c    2007-12-20 02:56:57.000000000 +0100
+++ vhba-module-new/vhba.c    2008-01-06 08:49:18.000000000 +0100
@@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/miscdevice.h>
#include <linux/poll.h>
+#include <linux/scatterlist.h>
#include <asm/uaccess.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
@@ -520,7 +521,7 @@
}
uaddr += len;
-                kaddr = kmap_atomic(sg[i].page, KM_USER0);
+                kaddr = kmap_atomic(sg_page(&sg[i]), KM_USER0);
memcpy(kaddr + sg[i].offset, kbuf, len);
kunmap_atomic(kaddr, KM_USER0);
[/code]

Go to top
JSN Boot template designed by JoomlaShine.com