Attachment 'rr62x-linuxla-src-v1.0-oneiric.patch'
Download
Toggle line numbers
1 diff -Naur rr62x-linuxla-src-v1.0/inc/linux/Makefile.def rr62x-linuxla-src-v1.0-patched/inc/linux/Makefile.def
2 --- rr62x-linuxla-src-v1.0/inc/linux/Makefile.def 2010-04-20 22:20:40.000000000 -0700
3 +++ rr62x-linuxla-src-v1.0-patched/inc/linux/Makefile.def 2011-12-23 13:17:28.109020102 -0800
4 @@ -74,19 +74,21 @@
5 KERNELDIR := /lib/modules/$(shell uname -r)/build
6 endif
7
8 -KERNEL_VER := 2.$(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/linux/version.h | cut -d\ -f3` / 256 % 256)
9 +KERNEL_VER := $(shell uname -r | cut -f1-2 -d.)
10
11 ifeq ($(KERNEL_VER),)
12 $(error Cannot find kernel version. Check $(KERNELDIR)/include/linux/version.h.)
13 endif
14
15 +ifneq ($(KERNEL_VER), 3.0)
16 ifneq ($(KERNEL_VER), 2.6)
17 ifneq ($(KERNEL_VER), 2.4)
18 -$(error Only kernel 2.4/2.6 is supported but you use $(KERNEL_VER))
19 +$(error Only kernel 2.4/2.6/3.0 is supported but you use $(KERNEL_VER))
20 +endif
21 endif
22 endif
23
24 -ifeq ($(KERNEL_VER), 2.6)
25 +ifeq ($(KERNEL_VER), $(filter $(KERNEL_VER),3.0 2.6))
26
27 TARGET := $(TARGETNAME).ko
28
29 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/install.sh rr62x-linuxla-src-v1.0-patched/osm/linux/install.sh
30 --- rr62x-linuxla-src-v1.0/osm/linux/install.sh 2010-04-20 22:20:41.000000000 -0700
31 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/install.sh 2011-12-23 13:20:00.683547644 -0800
32 @@ -14,6 +14,10 @@
33 OBJ=ko
34 MODVER=`modinfo -F vermagic ${PWD}/${TARGETNAME}.${OBJ} | cut -d' ' -f1`
35 ;;
36 + 3.0 )
37 + OBJ=ko
38 + MODVER=`modinfo -F vermagic ${PWD}/${TARGETNAME}.${OBJ} | cut -d' ' -f1`
39 + ;;
40 esac
41
42 if test "${MODVER}" = "" ; then
43 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/os_linux.c rr62x-linuxla-src-v1.0-patched/osm/linux/os_linux.c
44 --- rr62x-linuxla-src-v1.0/osm/linux/os_linux.c 2010-04-20 22:20:41.000000000 -0700
45 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/os_linux.c 2011-06-25 13:53:22.456283037 -0700
46 @@ -260,7 +260,7 @@
47 struct block_device *bdev = bdget(MKDEV(major[i], minor));
48 if (bdev &&
49 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
50 - blkdev_get(bdev, FMODE_READ)
51 + blkdev_get(bdev, FMODE_READ, NULL)
52 #else
53 blkdev_get(bdev, FMODE_READ, 0 __BDEV_RAW)
54 #endif
55 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/os_linux.c.rej rr62x-linuxla-src-v1.0-patched/osm/linux/os_linux.c.rej
56 --- rr62x-linuxla-src-v1.0/osm/linux/os_linux.c.rej 1969-12-31 16:00:00.000000000 -0800
57 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/os_linux.c.rej 2011-12-23 13:14:57.254431433 -0800
58 @@ -0,0 +1,11 @@
59 +--- osm/linux/os_linux.c 2010-04-20 22:20:41.000000000 -0700
60 ++++ osm/linux/os_linux.c 2011-06-25 12:49:28.058368483 -0700
61 +@@ -260,7 +260,7 @@
62 + struct block_device *bdev = bdget(MKDEV(major[i], minor));
63 + if (bdev &&
64 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
65 +- blkdev_get(bdev, FMODE_READ)
66 ++ blkdev_get(bdev, FMODE_READ, NULL)
67 + #else
68 + blkdev_get(bdev, FMODE_READ, 0 __BDEV_RAW)
69 + #endif
70 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/osm_linux.c rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.c
71 --- rr62x-linuxla-src-v1.0/osm/linux/osm_linux.c 2010-04-20 22:20:41.000000000 -0700
72 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.c 2011-06-25 13:53:22.556279422 -0700
73 @@ -922,7 +922,7 @@
74 }
75 }
76
77 -static int hpt_queuecommand (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
78 +static int hpt_queuecommand_lck (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
79 {
80 struct Scsi_Host *phost = sc_host(SCpnt);
81 PVBUS_EXT vbus_ext = get_vbus_ext(phost);
82 @@ -1456,6 +1456,12 @@
83 return 0;
84 }
85
86 +#ifdef DEF_SCSI_QCMD
87 +DEF_SCSI_QCMD(hpt_queuecommand)
88 +#else
89 +#define hpt_queuecommand hpt_queuecommand_lck
90 +#endif
91 +
92 static int hpt_reset (Scsi_Cmnd *SCpnt)
93 {
94 PVBUS_EXT vbus_ext = get_vbus_ext(sc_host(SCpnt));
95 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/osm_linux.c.rej rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.c.rej
96 --- rr62x-linuxla-src-v1.0/osm/linux/osm_linux.c.rej 1969-12-31 16:00:00.000000000 -0800
97 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.c.rej 2011-12-23 13:15:00.354320225 -0800
98 @@ -0,0 +1,24 @@
99 +--- osm/linux/osm_linux.c 2010-04-20 22:20:41.000000000 -0700
100 ++++ osm/linux/osm_linux.c 2011-06-25 12:37:31.565164140 -0700
101 +@@ -922,7 +922,7 @@
102 + }
103 + }
104 +
105 +-static int hpt_queuecommand (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
106 ++static int hpt_queuecommand_lck (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
107 + {
108 + struct Scsi_Host *phost = sc_host(SCpnt);
109 + PVBUS_EXT vbus_ext = get_vbus_ext(phost);
110 +@@ -1456,6 +1456,12 @@
111 + return 0;
112 + }
113 +
114 ++#ifdef DEF_SCSI_QCMD
115 ++DEF_SCSI_QCMD(hpt_queuecommand)
116 ++#else
117 ++#define hpt_queuecommand hpt_queuecommand_lck
118 ++#endif
119 ++
120 + static int hpt_reset (Scsi_Cmnd *SCpnt)
121 + {
122 + PVBUS_EXT vbus_ext = get_vbus_ext(sc_host(SCpnt));
123 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/osm_linux.h rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.h
124 --- rr62x-linuxla-src-v1.0/osm/linux/osm_linux.h 2010-04-20 22:20:41.000000000 -0700
125 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.h 2011-06-25 13:53:24.056225205 -0700
126 @@ -8,10 +8,6 @@
127
128 /* system headers */
129
130 -#ifndef AUTOCONF_INCLUDED
131 -#include <linux/config.h>
132 -#endif
133 -
134 #include <linux/version.h>
135
136 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) && defined(MODVERSIONS)
137 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/osm_linux.h.rej rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.h.rej
138 --- rr62x-linuxla-src-v1.0/osm/linux/osm_linux.h.rej 1969-12-31 16:00:00.000000000 -0800
139 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/osm_linux.h.rej 2011-12-23 13:15:04.224181397 -0800
140 @@ -0,0 +1,13 @@
141 +--- osm/linux/osm_linux.h 2010-04-20 22:20:41.000000000 -0700
142 ++++ osm/linux/osm_linux.h 2011-06-25 12:27:26.835399082 -0700
143 +@@ -8,10 +8,6 @@
144 +
145 + /* system headers */
146 +
147 +-#ifndef AUTOCONF_INCLUDED
148 +-#include <linux/config.h>
149 +-#endif
150 +-
151 + #include <linux/version.h>
152 +
153 + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) && defined(MODVERSIONS)
154 diff -Naur rr62x-linuxla-src-v1.0/osm/linux/patch.sh rr62x-linuxla-src-v1.0-patched/osm/linux/patch.sh
155 --- rr62x-linuxla-src-v1.0/osm/linux/patch.sh 2010-04-20 22:20:41.000000000 -0700
156 +++ rr62x-linuxla-src-v1.0-patched/osm/linux/patch.sh 2011-12-23 13:20:42.492048103 -0800
157 @@ -143,7 +143,7 @@
158 fi
159 fi
160 ;;
161 - 2.6 )
162 + 2.6 | 3.0 )
163 cd ${HPT_ROOT}/lib/linux/free-${ARCH}-regparm0
164 ld -r -o ${ARCH}-${TARGETNAME}.obj ${TARGETMODS}
165 mv ${ARCH}-${TARGETNAME}.obj $KERNELDIR/drivers/scsi/${TARGETNAME}/
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.