]> git.pld-linux.org Git - packages/kernel.git/blob - IPS-backport_from_2_6_10.patch
- ported from linux-2.4.25-atmdd.patch
[packages/kernel.git] / IPS-backport_from_2_6_10.patch
1 diff -Nur linux-2.6.8.1.org/drivers/scsi/ips.c linux-2.6.8.1/drivers/scsi/ips.c
2 --- linux-2.6.8.1.org/drivers/scsi/ips.c        2004-08-14 12:54:46.000000000 +0200
3 +++ linux-2.6.8.1/drivers/scsi/ips.c    2005-03-01 11:34:56.360361240 +0100
4 @@ -133,6 +133,10 @@
5  /* 6.10.00  - Remove 1G Addressing Limitations                               */
6  /* 6.11.xx  - Get VersionInfo buffer off the stack !              DDTS 60401 */
7  /* 6.11.xx  - Make Logical Drive Info structure safe for DMA      DDTS 60639 */
8 +/* 7.10.xx  - Add highmem_io flag in SCSI Templete for 2.4 kernels           */
9 +/*          - Fix path/name for scsi_hosts.h include for 2.6 kernels         */
10 +/*          - Fix sort order of 7k                                           */
11 +/*          - Remove 3 unused "inline" functions                             */
12  /*****************************************************************************/
13  
14  /*
15 @@ -176,7 +180,13 @@
16  #include <scsi/sg.h>
17  
18  #include "scsi.h"
19 +
20 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
21 +#include "hosts.h"
22 +#else
23  #include <scsi/scsi_host.h>
24 +#endif
25 +
26  #include "ips.h"
27  
28  #include <linux/module.h>
29 @@ -191,14 +201,14 @@
30  
31  #ifdef MODULE
32  static char *ips = NULL;
33 -MODULE_PARM(ips, "s");
34 +module_param(ips, charp, 0);
35  #endif
36  
37  /*
38   * DRIVER_VER
39   */
40 -#define IPS_VERSION_HIGH        "7.00"
41 -#define IPS_VERSION_LOW         ".15 "
42 +#define IPS_VERSION_HIGH        "7.10"
43 +#define IPS_VERSION_LOW         ".18 "
44  
45  #if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
46  #warning "This driver has only been tested on the x86/ia64/x86_64 platforms"
47 @@ -215,7 +225,7 @@
48  #endif
49  #else
50  #define IPS_SG_ADDRESS(sg)      (page_address((sg)->page) ? \
51 -                                     page_address((sg)->page)+(sg)->offset : 0)
52 +                                   page_address((sg)->page)+(sg)->offset : NULL)
53  #define IPS_LOCK_SAVE(lock,flags) do{spin_lock(lock);(void)flags;}while(0)
54  #define IPS_UNLOCK_RESTORE(lock,flags) do{spin_unlock(lock);(void)flags;}while(0)
55  #endif
56 @@ -278,6 +288,9 @@
57  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
58         .use_new_eh_code        = 1,
59  #endif
60 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20)  &&  LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
61 +    .highmem_io          = 1,   
62 +#endif
63  };
64  
65  IPS_DEFINE_COMPAT_TABLE( Compatable ); /* Version Compatability Table      */
66 @@ -474,21 +487,17 @@
67  static uint32_t ips_statupd_copperhead_memio(ips_ha_t *);
68  static uint32_t ips_statupd_morpheus(ips_ha_t *);
69  static ips_scb_t *ips_getscb(ips_ha_t *);
70 -static inline void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *);
71 -static inline void ips_putq_scb_tail(ips_scb_queue_t *, ips_scb_t *);
72 -static inline void ips_putq_wait_head(ips_wait_queue_t *, Scsi_Cmnd *);
73 -static inline void ips_putq_wait_tail(ips_wait_queue_t *, Scsi_Cmnd *);
74 -static inline void ips_putq_copp_head(ips_copp_queue_t *,
75 +static void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *);
76 +static void ips_putq_wait_tail(ips_wait_queue_t *, Scsi_Cmnd *);
77 +static void ips_putq_copp_tail(ips_copp_queue_t *,
78                                       ips_copp_wait_item_t *);
79 -static inline void ips_putq_copp_tail(ips_copp_queue_t *,
80 -                                     ips_copp_wait_item_t *);
81 -static inline ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *);
82 -static inline ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *);
83 -static inline Scsi_Cmnd *ips_removeq_wait_head(ips_wait_queue_t *);
84 -static inline Scsi_Cmnd *ips_removeq_wait(ips_wait_queue_t *, Scsi_Cmnd *);
85 -static inline ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *,
86 +static ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *);
87 +static ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *);
88 +static Scsi_Cmnd *ips_removeq_wait_head(ips_wait_queue_t *);
89 +static Scsi_Cmnd *ips_removeq_wait(ips_wait_queue_t *, Scsi_Cmnd *);
90 +static ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *,
91                                                      ips_copp_wait_item_t *);
92 -static inline ips_copp_wait_item_t *ips_removeq_copp_head(ips_copp_queue_t *);
93 +static ips_copp_wait_item_t *ips_removeq_copp_head(ips_copp_queue_t *);
94  
95  static int ips_is_passthru(Scsi_Cmnd *);
96  static int ips_make_passthru(ips_ha_t *, Scsi_Cmnd *, ips_scb_t *, int);
97 @@ -1885,7 +1894,7 @@
98  /*   Fill in a single scb sg_list element from an address                   */
99  /*   return a -1 if a breakup occurred                                      */
100  /****************************************************************************/
101 -static inline int
102 +static int
103  ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr,
104                        ips_scb_t * scb, int indx, unsigned int e_len)
105  {
106 @@ -2950,7 +2959,7 @@
107  /* ASSUMED to be called from within the HA lock                             */
108  /*                                                                          */
109  /****************************************************************************/
110 -static inline void
111 +static void
112  ips_putq_scb_head(ips_scb_queue_t * queue, ips_scb_t * item)
113  {
114         METHOD_TRACE("ips_putq_scb_head", 1);
115 @@ -2969,38 +2978,6 @@
116  
117  /****************************************************************************/
118  /*                                                                          */
119 -/* Routine Name: ips_putq_scb_tail                                          */
120 -/*                                                                          */
121 -/* Routine Description:                                                     */
122 -/*                                                                          */
123 -/*   Add an item to the tail of the queue                                   */
124 -/*                                                                          */
125 -/* ASSUMED to be called from within the HA lock                             */
126 -/*                                                                          */
127 -/****************************************************************************/
128 -static inline void
129 -ips_putq_scb_tail(ips_scb_queue_t * queue, ips_scb_t * item)
130 -{
131 -       METHOD_TRACE("ips_putq_scb_tail", 1);
132 -
133 -       if (!item)
134 -               return;
135 -
136 -       item->q_next = NULL;
137 -
138 -       if (queue->tail)
139 -               queue->tail->q_next = item;
140 -
141 -       queue->tail = item;
142 -
143 -       if (!queue->head)
144 -               queue->head = item;
145 -
146 -       queue->count++;
147 -}
148 -
149 -/****************************************************************************/
150 -/*                                                                          */
151  /* Routine Name: ips_removeq_scb_head                                       */
152  /*                                                                          */
153  /* Routine Description:                                                     */
154 @@ -3010,7 +2987,7 @@
155  /* ASSUMED to be called from within the HA lock                             */
156  /*                                                                          */
157  /****************************************************************************/
158 -static inline ips_scb_t *
159 +static ips_scb_t *
160  ips_removeq_scb_head(ips_scb_queue_t * queue)
161  {
162         ips_scb_t *item;
163 @@ -3045,7 +3022,7 @@
164  /* ASSUMED to be called from within the HA lock                             */
165  /*                                                                          */
166  /****************************************************************************/
167 -static inline ips_scb_t *
168 +static ips_scb_t *
169  ips_removeq_scb(ips_scb_queue_t * queue, ips_scb_t * item)
170  {
171         ips_scb_t *p;
172 @@ -3082,34 +3059,6 @@
173  
174  /****************************************************************************/
175  /*                                                                          */
176 -/* Routine Name: ips_putq_wait_head                                         */
177 -/*                                                                          */
178 -/* Routine Description:                                                     */
179 -/*                                                                          */
180 -/*   Add an item to the head of the queue                                   */
181 -/*                                                                          */
182 -/* ASSUMED to be called from within the HA lock                             */
183 -/*                                                                          */
184 -/****************************************************************************/
185 -static inline void
186 -ips_putq_wait_head(ips_wait_queue_t * queue, Scsi_Cmnd * item)
187 -{
188 -       METHOD_TRACE("ips_putq_wait_head", 1);
189 -
190 -       if (!item)
191 -               return;
192 -
193 -       item->host_scribble = (char *) queue->head;
194 -       queue->head = item;
195 -
196 -       if (!queue->tail)
197 -               queue->tail = item;
198 -
199 -       queue->count++;
200 -}
201 -
202 -/****************************************************************************/
203 -/*                                                                          */
204  /* Routine Name: ips_putq_wait_tail                                         */
205  /*                                                                          */
206  /* Routine Description:                                                     */
207 @@ -3119,7 +3068,7 @@
208  /* ASSUMED to be called from within the HA lock                             */
209  /*                                                                          */
210  /****************************************************************************/
211 -static inline void
212 +static void
213  ips_putq_wait_tail(ips_wait_queue_t * queue, Scsi_Cmnd * item)
214  {
215         METHOD_TRACE("ips_putq_wait_tail", 1);
216 @@ -3151,7 +3100,7 @@
217  /* ASSUMED to be called from within the HA lock                             */
218  /*                                                                          */
219  /****************************************************************************/
220 -static inline Scsi_Cmnd *
221 +static Scsi_Cmnd *
222  ips_removeq_wait_head(ips_wait_queue_t * queue)
223  {
224         Scsi_Cmnd *item;
225 @@ -3186,7 +3135,7 @@
226  /* ASSUMED to be called from within the HA lock                             */
227  /*                                                                          */
228  /****************************************************************************/
229 -static inline Scsi_Cmnd *
230 +static Scsi_Cmnd *
231  ips_removeq_wait(ips_wait_queue_t * queue, Scsi_Cmnd * item)
232  {
233         Scsi_Cmnd *p;
234 @@ -3223,34 +3172,6 @@
235  
236  /****************************************************************************/
237  /*                                                                          */
238 -/* Routine Name: ips_putq_copp_head                                         */
239 -/*                                                                          */
240 -/* Routine Description:                                                     */
241 -/*                                                                          */
242 -/*   Add an item to the head of the queue                                   */
243 -/*                                                                          */
244 -/* ASSUMED to be called from within the HA lock                             */
245 -/*                                                                          */
246 -/****************************************************************************/
247 -static inline void
248 -ips_putq_copp_head(ips_copp_queue_t * queue, ips_copp_wait_item_t * item)
249 -{
250 -       METHOD_TRACE("ips_putq_copp_head", 1);
251 -
252 -       if (!item)
253 -               return;
254 -
255 -       item->next = queue->head;
256 -       queue->head = item;
257 -
258 -       if (!queue->tail)
259 -               queue->tail = item;
260 -
261 -       queue->count++;
262 -}
263 -
264 -/****************************************************************************/
265 -/*                                                                          */
266  /* Routine Name: ips_putq_copp_tail                                         */
267  /*                                                                          */
268  /* Routine Description:                                                     */
269 @@ -3260,7 +3181,7 @@
270  /* ASSUMED to be called from within the HA lock                             */
271  /*                                                                          */
272  /****************************************************************************/
273 -static inline void
274 +static void
275  ips_putq_copp_tail(ips_copp_queue_t * queue, ips_copp_wait_item_t * item)
276  {
277         METHOD_TRACE("ips_putq_copp_tail", 1);
278 @@ -3292,7 +3213,7 @@
279  /* ASSUMED to be called from within the HA lock                             */
280  /*                                                                          */
281  /****************************************************************************/
282 -static inline ips_copp_wait_item_t *
283 +static ips_copp_wait_item_t *
284  ips_removeq_copp_head(ips_copp_queue_t * queue)
285  {
286         ips_copp_wait_item_t *item;
287 @@ -3327,7 +3248,7 @@
288  /* ASSUMED to be called from within the HA lock                             */
289  /*                                                                          */
290  /****************************************************************************/
291 -static inline ips_copp_wait_item_t *
292 +static ips_copp_wait_item_t *
293  ips_removeq_copp(ips_copp_queue_t * queue, ips_copp_wait_item_t * item)
294  {
295         ips_copp_wait_item_t *p;
296 @@ -6946,8 +6867,8 @@
297  {
298         ha->active = 0;
299         ips_free(ha);
300 -       ips_ha[index] = 0;
301 -       ips_sh[index] = 0;
302 +       ips_ha[index] = NULL;
303 +       ips_sh[index] = NULL;
304         return -1;
305  }
306  
307 @@ -6996,7 +6917,6 @@
308                         for (j = position; j < ips_num_controllers; j++) {
309                                 switch (ips_ha[j]->ad_type) {
310                                 case IPS_ADTYPE_SERVERAID6M:
311 -                               case IPS_ADTYPE_SERVERAID7k:
312                                 case IPS_ADTYPE_SERVERAID7M:
313                                         if (nvram->adapter_order[i] == 'M') {
314                                                 ips_shift_controllers(position,
315 @@ -7017,6 +6937,7 @@
316                                 case IPS_ADTYPE_SERVERAID6I:
317                                 case IPS_ADTYPE_SERVERAID5I2:
318                                 case IPS_ADTYPE_SERVERAID5I1:
319 +                               case IPS_ADTYPE_SERVERAID7k:
320                                         if (nvram->adapter_order[i] == 'S') {
321                                                 ips_shift_controllers(position,
322                                                                       j);
323 @@ -7545,6 +7466,13 @@
324  MODULE_LICENSE("GPL");
325  #endif
326  
327 +MODULE_DESCRIPTION("IBM ServeRAID Adapter Driver " IPS_VER_STRING);
328 +
329 +#ifdef MODULE_VERSION
330 +MODULE_VERSION(IPS_VER_STRING);
331 +#endif
332 +
333 +
334  /*
335   * Overrides for Emacs so that we almost follow Linus's tabbing style.
336   * Emacs will notice this stuff at the end of the file and automatically
337 diff -Nur linux-2.6.8.1.org/drivers/scsi/ips.h linux-2.6.8.1/drivers/scsi/ips.h
338 --- linux-2.6.8.1.org/drivers/scsi/ips.h        2004-08-14 12:54:51.000000000 +0200
339 +++ linux-2.6.8.1/drivers/scsi/ips.h    2005-03-01 11:34:08.487639000 +0100
340 @@ -96,7 +96,11 @@
341     #endif
342  
343     #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
344 -      typedef void irqreturn_t;
345 +   
346 +      #ifndef irqreturn_t
347 +         typedef void irqreturn_t;
348 +      #endif 
349 +      
350        #define IRQ_NONE
351        #define IRQ_HANDLED
352        #define IRQ_RETVAL(x)
353 @@ -1113,8 +1117,8 @@
354     uint32_t           mem_addr;           /* Memory mapped address      */
355     uint32_t           io_len;             /* Size of IO Address         */
356     uint32_t           mem_len;            /* Size of memory address     */
357 -   char              *mem_ptr;            /* Memory mapped Ptr          */
358 -   char              *ioremap_ptr;        /* ioremapped memory pointer  */
359 +   char              *mem_ptr;    /* Memory mapped Ptr          */
360 +   char              *ioremap_ptr;/* ioremapped memory pointer  */
361     ips_hw_func_t      func;               /* hw function pointers       */
362     struct pci_dev    *pcidev;             /* PCI device handle          */
363     char              *flash_data;         /* Save Area for flash data   */
364 @@ -1210,13 +1214,13 @@
365  
366  #define IPS_VER_MAJOR 7
367  #define IPS_VER_MAJOR_STRING "7"
368 -#define IPS_VER_MINOR 00
369 -#define IPS_VER_MINOR_STRING "00"
370 -#define IPS_VER_BUILD 15
371 -#define IPS_VER_BUILD_STRING "15"
372 -#define IPS_VER_STRING "7.00.15"
373 +#define IPS_VER_MINOR 10
374 +#define IPS_VER_MINOR_STRING "10"
375 +#define IPS_VER_BUILD 18
376 +#define IPS_VER_BUILD_STRING "18"
377 +#define IPS_VER_STRING "7.10.18"
378  #define IPS_RELEASE_ID 0x00020000
379 -#define IPS_BUILD_IDENT 625
380 +#define IPS_BUILD_IDENT 731
381  #define IPS_LEGALCOPYRIGHT_STRING "(C) Copyright IBM Corp. 1994, 2002. All Rights Reserved."
382  #define IPS_ADAPTECCOPYRIGHT_STRING "(c) Copyright Adaptec, Inc. 2002 to 2004. All Rights Reserved."
383  #define IPS_DELLCOPYRIGHT_STRING "(c) Copyright Dell 2004. All Rights Reserved."
384 @@ -1227,32 +1231,35 @@
385  #define IPS_VER_SERVERAID2 "2.88.13"
386  #define IPS_VER_NAVAJO "2.88.13"
387  #define IPS_VER_SERVERAID3 "6.10.24"
388 -#define IPS_VER_SERVERAID4H "7.00.15"
389 -#define IPS_VER_SERVERAID4MLx "7.00.15"
390 -#define IPS_VER_SARASOTA "7.00.15"
391 -#define IPS_VER_MARCO "7.00.15"
392 -#define IPS_VER_SEBRING "7.00.15"
393 +#define IPS_VER_SERVERAID4H "7.10.11"
394 +#define IPS_VER_SERVERAID4MLx "7.10.18"
395 +#define IPS_VER_SARASOTA "7.10.18"
396 +#define IPS_VER_MARCO "7.10.18"
397 +#define IPS_VER_SEBRING "7.10.18"
398 +#define IPS_VER_KEYWEST "7.10.18"
399  
400  /* Compatability IDs for various adapters */
401  #define IPS_COMPAT_UNKNOWN ""
402 -#define IPS_COMPAT_CURRENT "SB610"
403 +#define IPS_COMPAT_CURRENT "KW710"
404  #define IPS_COMPAT_SERVERAID1 "2.25.01"
405  #define IPS_COMPAT_SERVERAID2 "2.88.13"
406  #define IPS_COMPAT_NAVAJO  "2.88.13"
407  #define IPS_COMPAT_KIOWA "2.88.13"
408  #define IPS_COMPAT_SERVERAID3H  "SB610"
409  #define IPS_COMPAT_SERVERAID3L  "SB610"
410 -#define IPS_COMPAT_SERVERAID4H  "SB610"
411 -#define IPS_COMPAT_SERVERAID4M  "SB610"
412 -#define IPS_COMPAT_SERVERAID4L  "SB610"
413 -#define IPS_COMPAT_SERVERAID4Mx "SB610"
414 -#define IPS_COMPAT_SERVERAID4Lx "SB610"
415 -#define IPS_COMPAT_SARASOTA     "SB610"
416 -#define IPS_COMPAT_MARCO        "SB610"
417 -#define IPS_COMPAT_SEBRING      "SB610"
418 -#define IPS_COMPAT_BIOS "SB610"
419 +#define IPS_COMPAT_SERVERAID4H  "KW710"
420 +#define IPS_COMPAT_SERVERAID4M  "KW710"
421 +#define IPS_COMPAT_SERVERAID4L  "KW710"
422 +#define IPS_COMPAT_SERVERAID4Mx "KW710"
423 +#define IPS_COMPAT_SERVERAID4Lx "KW710"
424 +#define IPS_COMPAT_SARASOTA     "KW710"
425 +#define IPS_COMPAT_MARCO        "KW710"
426 +#define IPS_COMPAT_SEBRING      "KW710"
427 +#define IPS_COMPAT_TAMPA        "KW710"
428 +#define IPS_COMPAT_KEYWEST      "KW710"
429 +#define IPS_COMPAT_BIOS "KW710"
430  
431 -#define IPS_COMPAT_MAX_ADAPTER_TYPE 16
432 +#define IPS_COMPAT_MAX_ADAPTER_TYPE 18
433  #define IPS_COMPAT_ID_LENGTH 8
434  
435  #define IPS_DEFINE_COMPAT_TABLE(tablename) \
436 @@ -1272,7 +1279,9 @@
437        IPS_COMPAT_SARASOTA,         /* one-channel variety of SARASOTA */  \
438        IPS_COMPAT_SARASOTA,         /* two-channel variety of SARASOTA */  \
439        IPS_COMPAT_MARCO, \
440 -      IPS_COMPAT_SEBRING \
441 +      IPS_COMPAT_SEBRING, \
442 +      IPS_COMPAT_TAMPA, \
443 +      IPS_COMPAT_KEYWEST \
444     }
445  
446  
This page took 0.061131 seconds and 3 git commands to generate.