/[linux-patches]/genpatches-2.6/trunk/2.6.12/4350_megaraid-update.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.12/4350_megaraid-update.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (show annotations) (download)
Wed Jun 29 15:34:26 2005 UTC (13 years ago) by dsd
File size: 13929 byte(s)
Megaraid driver update, and a patch to allow both megaraid drivers to be built side-by-side
1 Author: Ju, Seokmann <sju@lsil.com>
2 Date: Mon, 16 May 2005 22:32:17 +0000 (-0400)
3 Source: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=672b2d38da4fff4c4452685a25fb88b65243d1a6
4
5 [SCSI] megaraid version 2.20.4.6
6
7 Signed-off by: Seokmann Ju <sju@lsil.com>
8 Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
9
10 --- a/Documentation/scsi/ChangeLog.megaraid
11 +++ b/Documentation/scsi/ChangeLog.megaraid
12 @@ -1,3 +1,69 @@
13 +Release Date : Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
14 +Current Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
15 +Older Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
16 +
17 +1. Added IOCTL backward compatibility.
18 + Convert megaraid_mm driver to new compat_ioctl entry points.
19 + I don't have easy access to hardware, so only compile tested.
20 + - Signed-off-by:Andi Kleen <ak@muc.de>
21 +
22 +2. megaraid_mbox fix: wrong order of arguments in memset()
23 + That, BTW, shows why cross-builds are useful-the only indication of
24 + problem had been a new warning showing up in sparse output on alpha
25 + build (number of exceeding 256 got truncated).
26 + - Signed-off-by: Al Viro
27 + <viro@parcelfarce.linux.theplanet.co.uk>
28 +
29 +3. Convert pci_module_init to pci_register_driver
30 + Convert from pci_module_init to pci_register_driver
31 + (from:http://kerneljanitors.org/TODO)
32 + - Signed-off-by: Domen Puncer <domen@coderock.org>
33 +
34 +4. Use the pre defined DMA mask constants from dma-mapping.h
35 + Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling
36 + pci_set_dma_mask() or pci_set_consistend_dma_mask(). See
37 + http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for more
38 + details.
39 + Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
40 + Signed-off-by: Domen Puncer <domen@coderock.org>
41 +
42 +5. Remove SSID checking for Dobson, Lindsay, and Verde based products.
43 + Checking the SSVID/SSID for controllers which have Dobson, Lindsay,
44 + and Verde is unnecessary because device ID has been assigned by LSI
45 + and it is unique value. So, all controllers with these IOPs have to be
46 + supported by the driver regardless SSVID/SSID.
47 +
48 +6. Date Thu, 27 Jan 2005 04:31:09 +0100
49 + From Herbert Poetzl <>
50 + Subject RFC: assert_spin_locked() for 2.6
51 +
52 + Greetings!
53 +
54 + overcautious programming will kill your kernel ;)
55 + ever thought about checking a spin_lock or even
56 + asserting that it must be held (maybe just for
57 + spinlock debugging?) ...
58 +
59 + there are several checks present in the kernel
60 + where somebody does a variation on the following:
61 +
62 + BUG_ON(!spin_is_locked(&some_lock));
63 +
64 + so what's wrong about that? nothing, unless you
65 + compile the code with CONFIG_DEBUG_SPINLOCK but
66 + without CONFIG_SMP ... in which case the BUG()
67 + will kill your kernel ...
68 +
69 + maybe it's not advised to make such assertions,
70 + but here is a solution which works for me ...
71 + (compile tested for sh, x86_64 and x86, boot/run
72 + tested for x86 only)
73 +
74 + best,
75 + Herbert
76 +
77 + - Herbert Poetzl <herbert@13thfloor.at>, Thu, 27 Jan 2005
78 +
79 Release Date : Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
80 Current Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
81 Older Version : 2.20.4.4 (scsi module), 2.20.2.4 (cmm module)
82 --- a/drivers/scsi/megaraid/mega_common.h
83 +++ b/drivers/scsi/megaraid/mega_common.h
84 @@ -27,6 +27,7 @@
85 #include <linux/list.h>
86 #include <linux/version.h>
87 #include <linux/moduleparam.h>
88 +#include <linux/dma-mapping.h>
89 #include <asm/semaphore.h>
90 #include <scsi/scsi.h>
91 #include <scsi/scsi_cmnd.h>
92 --- a/drivers/scsi/megaraid/megaraid_mbox.c
93 +++ b/drivers/scsi/megaraid/megaraid_mbox.c
94 @@ -10,7 +10,7 @@
95 * 2 of the License, or (at your option) any later version.
96 *
97 * FILE : megaraid_mbox.c
98 - * Version : v2.20.4.5 (Feb 03 2005)
99 + * Version : v2.20.4.6 (Mar 07 2005)
100 *
101 * Authors:
102 * Atul Mukker <Atul.Mukker@lsil.com>
103 @@ -202,7 +202,7 @@ MODULE_PARM_DESC(debug_level, "Debug lev
104 * ### global data ###
105 */
106 static uint8_t megaraid_mbox_version[8] =
107 - { 0x02, 0x20, 0x04, 0x05, 2, 3, 20, 5 };
108 + { 0x02, 0x20, 0x04, 0x06, 3, 7, 20, 5 };
109
110
111 /*
112 @@ -229,9 +229,9 @@ static struct pci_device_id pci_id_table
113 },
114 {
115 PCI_VENDOR_ID_LSI_LOGIC,
116 - PCI_DEVICE_ID_PERC4_QC,
117 - PCI_VENDOR_ID_DELL,
118 - PCI_SUBSYS_ID_PERC4_QC,
119 + PCI_DEVICE_ID_VERDE,
120 + PCI_ANY_ID,
121 + PCI_ANY_ID,
122 },
123 {
124 PCI_VENDOR_ID_DELL,
125 @@ -271,15 +271,9 @@ static struct pci_device_id pci_id_table
126 },
127 {
128 PCI_VENDOR_ID_LSI_LOGIC,
129 - PCI_DEVICE_ID_PERC4E_DC_320_2E,
130 - PCI_VENDOR_ID_DELL,
131 - PCI_SUBSYS_ID_PERC4E_DC_320_2E,
132 - },
133 - {
134 - PCI_VENDOR_ID_LSI_LOGIC,
135 - PCI_DEVICE_ID_PERC4E_SC_320_1E,
136 - PCI_VENDOR_ID_DELL,
137 - PCI_SUBSYS_ID_PERC4E_SC_320_1E,
138 + PCI_DEVICE_ID_DOBSON,
139 + PCI_ANY_ID,
140 + PCI_ANY_ID,
141 },
142 {
143 PCI_VENDOR_ID_AMI,
144 @@ -331,36 +325,6 @@ static struct pci_device_id pci_id_table
145 },
146 {
147 PCI_VENDOR_ID_LSI_LOGIC,
148 - PCI_DEVICE_ID_MEGARAID_SCSI_320_0x,
149 - PCI_VENDOR_ID_LSI_LOGIC,
150 - PCI_SUBSYS_ID_MEGARAID_SCSI_320_0x,
151 - },
152 - {
153 - PCI_VENDOR_ID_LSI_LOGIC,
154 - PCI_DEVICE_ID_MEGARAID_SCSI_320_2x,
155 - PCI_VENDOR_ID_LSI_LOGIC,
156 - PCI_SUBSYS_ID_MEGARAID_SCSI_320_2x,
157 - },
158 - {
159 - PCI_VENDOR_ID_LSI_LOGIC,
160 - PCI_DEVICE_ID_MEGARAID_SCSI_320_4x,
161 - PCI_VENDOR_ID_LSI_LOGIC,
162 - PCI_SUBSYS_ID_MEGARAID_SCSI_320_4x,
163 - },
164 - {
165 - PCI_VENDOR_ID_LSI_LOGIC,
166 - PCI_DEVICE_ID_MEGARAID_SCSI_320_1E,
167 - PCI_VENDOR_ID_LSI_LOGIC,
168 - PCI_SUBSYS_ID_MEGARAID_SCSI_320_1E,
169 - },
170 - {
171 - PCI_VENDOR_ID_LSI_LOGIC,
172 - PCI_DEVICE_ID_MEGARAID_SCSI_320_2E,
173 - PCI_VENDOR_ID_LSI_LOGIC,
174 - PCI_SUBSYS_ID_MEGARAID_SCSI_320_2E,
175 - },
176 - {
177 - PCI_VENDOR_ID_LSI_LOGIC,
178 PCI_DEVICE_ID_MEGARAID_I4_133_RAID,
179 PCI_VENDOR_ID_LSI_LOGIC,
180 PCI_SUBSYS_ID_MEGARAID_I4_133_RAID,
181 @@ -379,21 +343,9 @@ static struct pci_device_id pci_id_table
182 },
183 {
184 PCI_VENDOR_ID_LSI_LOGIC,
185 - PCI_DEVICE_ID_MEGARAID_SATA_300_4x,
186 - PCI_VENDOR_ID_LSI_LOGIC,
187 - PCI_SUBSYS_ID_MEGARAID_SATA_300_4x,
188 - },
189 - {
190 - PCI_VENDOR_ID_LSI_LOGIC,
191 - PCI_DEVICE_ID_MEGARAID_SATA_300_8x,
192 - PCI_VENDOR_ID_LSI_LOGIC,
193 - PCI_SUBSYS_ID_MEGARAID_SATA_300_8x,
194 - },
195 - {
196 - PCI_VENDOR_ID_LSI_LOGIC,
197 - PCI_DEVICE_ID_INTEL_RAID_SRCU42X,
198 - PCI_VENDOR_ID_INTEL,
199 - PCI_SUBSYS_ID_INTEL_RAID_SRCU42X,
200 + PCI_DEVICE_ID_LINDSAY,
201 + PCI_ANY_ID,
202 + PCI_ANY_ID,
203 },
204 {
205 PCI_VENDOR_ID_LSI_LOGIC,
206 @@ -403,58 +355,10 @@ static struct pci_device_id pci_id_table
207 },
208 {
209 PCI_VENDOR_ID_LSI_LOGIC,
210 - PCI_DEVICE_ID_INTEL_RAID_SRCU42E,
211 - PCI_VENDOR_ID_INTEL,
212 - PCI_SUBSYS_ID_INTEL_RAID_SRCU42E,
213 - },
214 - {
215 - PCI_VENDOR_ID_LSI_LOGIC,
216 - PCI_DEVICE_ID_INTEL_RAID_SRCZCRX,
217 - PCI_VENDOR_ID_INTEL,
218 - PCI_SUBSYS_ID_INTEL_RAID_SRCZCRX,
219 - },
220 - {
221 - PCI_VENDOR_ID_LSI_LOGIC,
222 - PCI_DEVICE_ID_INTEL_RAID_SRCS28X,
223 - PCI_VENDOR_ID_INTEL,
224 - PCI_SUBSYS_ID_INTEL_RAID_SRCS28X,
225 - },
226 - {
227 - PCI_VENDOR_ID_LSI_LOGIC,
228 - PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_ALIEF,
229 - PCI_VENDOR_ID_INTEL,
230 - PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_ALIEF,
231 - },
232 - {
233 - PCI_VENDOR_ID_LSI_LOGIC,
234 - PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_HARWICH,
235 - PCI_VENDOR_ID_INTEL,
236 - PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_HARWICH,
237 - },
238 - {
239 - PCI_VENDOR_ID_LSI_LOGIC,
240 PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK,
241 PCI_VENDOR_ID_INTEL,
242 PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK,
243 },
244 - {
245 - PCI_VENDOR_ID_LSI_LOGIC,
246 - PCI_DEVICE_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB,
247 - PCI_SUBSYS_ID_FSC,
248 - PCI_SUBSYS_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB,
249 - },
250 - {
251 - PCI_VENDOR_ID_LSI_LOGIC,
252 - PCI_DEVICE_ID_MEGARAID_ACER_ROMB_2E,
253 - PCI_VENDOR_ID_AI,
254 - PCI_SUBSYS_ID_MEGARAID_ACER_ROMB_2E,
255 - },
256 - {
257 - PCI_VENDOR_ID_LSI_LOGIC,
258 - PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E,
259 - PCI_VENDOR_ID_NEC,
260 - PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E,
261 - },
262 {0} /* Terminating entry */
263 };
264 MODULE_DEVICE_TABLE(pci, pci_id_table_g);
265 @@ -539,7 +443,8 @@ megaraid_init(void)
266
267
268 // register as a PCI hot-plug driver module
269 - if ((rval = pci_module_init(&megaraid_pci_driver_g))) {
270 + rval = pci_register_driver(&megaraid_pci_driver_g);
271 + if (rval < 0) {
272 con_log(CL_ANN, (KERN_WARNING
273 "megaraid: could not register hotplug support.\n"));
274 }
275 @@ -619,7 +524,7 @@ megaraid_probe_one(struct pci_dev *pdev,
276
277 // Setup the default DMA mask. This would be changed later on
278 // depending on hardware capabilities
279 - if (pci_set_dma_mask(adapter->pdev, 0xFFFFFFFF) != 0) {
280 + if (pci_set_dma_mask(adapter->pdev, DMA_32BIT_MASK) != 0) {
281
282 con_log(CL_ANN, (KERN_WARNING
283 "megaraid: pci_set_dma_mask failed:%d\n", __LINE__));
284 @@ -1031,7 +936,7 @@ megaraid_init_mbox(adapter_t *adapter)
285
286 // Set the DMA mask to 64-bit. All supported controllers as capable of
287 // DMA in this range
288 - if (pci_set_dma_mask(adapter->pdev, 0xFFFFFFFFFFFFFFFFULL) != 0) {
289 + if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) {
290
291 con_log(CL_ANN, (KERN_WARNING
292 "megaraid: could not set DMA mask for 64-bit.\n"));
293 --- a/drivers/scsi/megaraid/megaraid_mbox.h
294 +++ b/drivers/scsi/megaraid/megaraid_mbox.h
295 @@ -21,8 +21,8 @@
296 #include "megaraid_ioctl.h"
297
298
299 -#define MEGARAID_VERSION "2.20.4.5"
300 -#define MEGARAID_EXT_VERSION "(Release Date: Thu Feb 03 12:27:22 EST 2005)"
301 +#define MEGARAID_VERSION "2.20.4.6"
302 +#define MEGARAID_EXT_VERSION "(Release Date: Mon Mar 07 12:27:22 EST 2005)"
303
304
305 /*
306 @@ -37,8 +37,7 @@
307 #define PCI_DEVICE_ID_PERC4_DC 0x1960
308 #define PCI_SUBSYS_ID_PERC4_DC 0x0518
309
310 -#define PCI_DEVICE_ID_PERC4_QC 0x0407
311 -#define PCI_SUBSYS_ID_PERC4_QC 0x0531
312 +#define PCI_DEVICE_ID_VERDE 0x0407
313
314 #define PCI_DEVICE_ID_PERC4_DI_EVERGLADES 0x000F
315 #define PCI_SUBSYS_ID_PERC4_DI_EVERGLADES 0x014A
316 @@ -58,11 +57,7 @@
317 #define PCI_DEVICE_ID_PERC4E_DI_GUADALUPE 0x0013
318 #define PCI_SUBSYS_ID_PERC4E_DI_GUADALUPE 0x0170
319
320 -#define PCI_DEVICE_ID_PERC4E_DC_320_2E 0x0408
321 -#define PCI_SUBSYS_ID_PERC4E_DC_320_2E 0x0002
322 -
323 -#define PCI_DEVICE_ID_PERC4E_SC_320_1E 0x0408
324 -#define PCI_SUBSYS_ID_PERC4E_SC_320_1E 0x0001
325 +#define PCI_DEVICE_ID_DOBSON 0x0408
326
327 #define PCI_DEVICE_ID_MEGARAID_SCSI_320_0 0x1960
328 #define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0 0xA520
329 @@ -73,21 +68,6 @@
330 #define PCI_DEVICE_ID_MEGARAID_SCSI_320_2 0x1960
331 #define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2 0x0518
332
333 -#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0x 0x0407
334 -#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0x 0x0530
335 -
336 -#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2x 0x0407
337 -#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2x 0x0532
338 -
339 -#define PCI_DEVICE_ID_MEGARAID_SCSI_320_4x 0x0407
340 -#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_4x 0x0531
341 -
342 -#define PCI_DEVICE_ID_MEGARAID_SCSI_320_1E 0x0408
343 -#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_1E 0x0001
344 -
345 -#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2E 0x0408
346 -#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2E 0x0002
347 -
348 #define PCI_DEVICE_ID_MEGARAID_I4_133_RAID 0x1960
349 #define PCI_SUBSYS_ID_MEGARAID_I4_133_RAID 0x0522
350
351 @@ -97,52 +77,18 @@
352 #define PCI_DEVICE_ID_MEGARAID_SATA_150_6 0x1960
353 #define PCI_SUBSYS_ID_MEGARAID_SATA_150_6 0x0523
354
355 -#define PCI_DEVICE_ID_MEGARAID_SATA_300_4x 0x0409
356 -#define PCI_SUBSYS_ID_MEGARAID_SATA_300_4x 0x3004
357 -
358 -#define PCI_DEVICE_ID_MEGARAID_SATA_300_8x 0x0409
359 -#define PCI_SUBSYS_ID_MEGARAID_SATA_300_8x 0x3008
360 -
361 -#define PCI_DEVICE_ID_INTEL_RAID_SRCU42X 0x0407
362 -#define PCI_SUBSYS_ID_INTEL_RAID_SRCU42X 0x0532
363 +#define PCI_DEVICE_ID_LINDSAY 0x0409
364
365 #define PCI_DEVICE_ID_INTEL_RAID_SRCS16 0x1960
366 #define PCI_SUBSYS_ID_INTEL_RAID_SRCS16 0x0523
367
368 -#define PCI_DEVICE_ID_INTEL_RAID_SRCU42E 0x0408
369 -#define PCI_SUBSYS_ID_INTEL_RAID_SRCU42E 0x0002
370 -
371 -#define PCI_DEVICE_ID_INTEL_RAID_SRCZCRX 0x0407
372 -#define PCI_SUBSYS_ID_INTEL_RAID_SRCZCRX 0x0530
373 -
374 -#define PCI_DEVICE_ID_INTEL_RAID_SRCS28X 0x0409
375 -#define PCI_SUBSYS_ID_INTEL_RAID_SRCS28X 0x3008
376 -
377 -#define PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_ALIEF 0x0408
378 -#define PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_ALIEF 0x3431
379 -
380 -#define PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_HARWICH 0x0408
381 -#define PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_HARWICH 0x3499
382 -
383 #define PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK 0x1960
384 #define PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK 0x0520
385
386 -#define PCI_DEVICE_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB 0x0408
387 -#define PCI_SUBSYS_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB 0x1065
388 -
389 -#define PCI_DEVICE_ID_MEGARAID_ACER_ROMB_2E 0x0408
390 -#define PCI_SUBSYS_ID_MEGARAID_ACER_ROMB_2E 0x004D
391 -
392 #define PCI_SUBSYS_ID_PERC3_QC 0x0471
393 #define PCI_SUBSYS_ID_PERC3_DC 0x0493
394 #define PCI_SUBSYS_ID_PERC3_SC 0x0475
395
396 -#define PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E 0x0408
397 -#define PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E 0x8287
398 -
399 -#ifndef PCI_SUBSYS_ID_FSC
400 -#define PCI_SUBSYS_ID_FSC 0x1734
401 -#endif
402
403 #define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for kernel
404 #define MBOX_MAX_USER_CMDS 32 // number of cmds for applications
405 --- a/drivers/scsi/megaraid/megaraid_mm.c
406 +++ b/drivers/scsi/megaraid/megaraid_mm.c
407 @@ -10,13 +10,12 @@
408 * 2 of the License, or (at your option) any later version.
409 *
410 * FILE : megaraid_mm.c
411 - * Version : v2.20.2.5 (Jan 21 2005)
412 + * Version : v2.20.2.6 (Mar 7 2005)
413 *
414 * Common management module
415 */
416
417 #include "megaraid_mm.h"
418 -#include <linux/smp_lock.h>
419
420
421 // Entry points for char node driver
422 @@ -61,7 +60,7 @@ EXPORT_SYMBOL(mraid_mm_unregister_adp);
423 EXPORT_SYMBOL(mraid_mm_adapter_app_handle);
424
425 static int majorno;
426 -static uint32_t drvr_ver = 0x02200201;
427 +static uint32_t drvr_ver = 0x02200206;
428
429 static int adapters_count_g;
430 static struct list_head adapters_list_g;
431 @@ -1231,9 +1230,9 @@ mraid_mm_compat_ioctl(struct file *filep
432 unsigned long arg)
433 {
434 int err;
435 - lock_kernel();
436 +
437 err = mraid_mm_ioctl(NULL, filep, cmd, arg);
438 - unlock_kernel();
439 +
440 return err;
441 }
442 #endif
443 --- a/drivers/scsi/megaraid/megaraid_mm.h
444 +++ b/drivers/scsi/megaraid/megaraid_mm.h
445 @@ -29,9 +29,9 @@
446 #include "megaraid_ioctl.h"
447
448
449 -#define LSI_COMMON_MOD_VERSION "2.20.2.5"
450 +#define LSI_COMMON_MOD_VERSION "2.20.2.6"
451 #define LSI_COMMON_MOD_EXT_VERSION \
452 - "(Release Date: Fri Jan 21 00:01:03 EST 2005)"
453 + "(Release Date: Mon Mar 7 00:01:03 EST 2005)"
454
455
456 #define LSI_DBGLVL dbglevel

  ViewVC Help
Powered by ViewVC 1.1.20