summaryrefslogtreecommitdiffstats
path: root/system/vhba-module/vhba-update_to_svn.diff
blob: 41591380eae92eb658976ff21fef630b373dc759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
diff -Nur vhba-module-1.2.1.orig//kat/have_scsi_macros.c vhba-module-1.2.1/kat/have_scsi_macros.c
--- vhba-module-1.2.1.orig//kat/have_scsi_macros.c	2009-01-17 17:21:16.000000000 -0600
+++ vhba-module-1.2.1/kat/have_scsi_macros.c	2010-06-30 23:41:37.203194236 -0500
@@ -1,4 +1,3 @@
-#include <linux/autoconf.h>
 #include <scsi/scsi_cmnd.h>
 
 void testfunc (void);
diff -Nur vhba-module-1.2.1.orig//kat/scatterlist_has_page_link.c vhba-module-1.2.1/kat/scatterlist_has_page_link.c
--- vhba-module-1.2.1.orig//kat/scatterlist_has_page_link.c	2009-01-17 17:21:16.000000000 -0600
+++ vhba-module-1.2.1/kat/scatterlist_has_page_link.c	2010-06-30 23:40:49.982069552 -0500
@@ -1,4 +1,3 @@
-#include <linux/autoconf.h>
 #include <linux/scatterlist.h>
 
 /* Note: scatterlist.page_link is used in kernel (2.6.24 <= version < X) */
diff -Nur vhba-module-1.2.1.orig//vhba.c vhba-module-1.2.1/vhba.c
--- vhba-module-1.2.1.orig//vhba.c	2009-01-17 17:21:16.000000000 -0600
+++ vhba-module-1.2.1/vhba.c	2010-06-30 23:40:14.430097774 -0500
@@ -1,7 +1,7 @@
 /*
  * vhba.c
  *
- * Copyright (C) 2007 Chia-I Wu <b90201047 AT ntu DOT edu DOT tw>
+ * Copyright (C) 2007-2010 Chia-I Wu <b90201047 AT ntu DOT edu DOT tw>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -26,6 +26,10 @@
 #include <linux/platform_device.h>
 #include <linux/miscdevice.h>
 #include <linux/poll.h>
+#include <linux/slab.h>
+#ifdef CONFIG_COMPAT
+#include <linux/compat.h>
+#endif
 #include <asm/uaccess.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
@@ -52,7 +56,7 @@
         dev_warn(&(scmd)->device->sdev_gendev, fmt, ##a)
 
 
-#define VHBA_MAX_SECTORS_PER_IO 128
+#define VHBA_MAX_SECTORS_PER_IO 256
 #define VHBA_MAX_ID 32
 #define VHBA_CAN_QUEUE 32
 #define VHBA_INVALID_ID VHBA_MAX_ID
@@ -671,7 +675,7 @@
         return ret;
 }
 
-static int vhba_ctl_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static long vhba_ctl_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
 {
         struct vhba_device *vdev = file->private_data;
         struct vhba_host *vhost;
@@ -704,6 +708,15 @@
         return -ENOTTY;
 }
 
+#ifdef CONFIG_COMPAT
+static long vhba_ctl_compat_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
+{
+	unsigned long compat_arg = (unsigned long)compat_ptr(arg);
+
+	return vhba_ctl_ioctl(file, cmd, compat_arg);
+}	
+#endif
+
 static unsigned int vhba_ctl_poll(struct file *file, poll_table *wait)
 {
         struct vhba_device *vdev = file->private_data;
@@ -781,7 +794,10 @@
         .read = vhba_ctl_read,
         .write = vhba_ctl_write,
         .poll = vhba_ctl_poll,
-        .ioctl = vhba_ctl_ioctl,
+        .unlocked_ioctl = vhba_ctl_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl = vhba_ctl_compat_ioctl,
+#endif
 };
 
 static struct miscdevice vhba_miscdev = {