- pre4:
[davej-history.git] / drivers / scsi / megaraid.h
blobdc6207ba2fc2f2a6eed266cb5a268c7440bcb32f
1 #ifndef __MEGARAID_H__
2 #define __MEGARAID_H__
4 #ifndef LINUX_VERSION_CODE
5 #include <linux/version.h>
6 #endif
8 #define IN_ISR 0x80000000L
9 #define IN_ABORT 0x40000000L
10 #define IN_RESET 0x20000000L
11 #define IN_QUEUE 0x10000000L
12 #define BOARD_QUARTZ 0x08000000L
13 #define BOARD_40LD 0x04000000L
15 #ifndef HOSTS_C
16 #define SCB_FREE 0x0
17 #define SCB_ACTIVE 0x1
18 #define SCB_WAITQ 0x2
19 #define SCB_ISSUED 0x3
20 #define SCB_COMPLETE 0x4
21 #define SCB_ABORTED 0x5
22 #define SCB_RESET 0x6
23 #endif
25 #define MEGA_CMD_TIMEOUT 10
27 /* Feel free to fiddle with these.. max values are:
28 SGLIST 0..26
29 COMMANDS 0..253
30 CMDPERLUN 0..63
32 #define MAX_SGLIST 0x1A
33 #define MAX_COMMANDS 127
34 #define MAX_CMD_PER_LUN 63
35 #define MAX_FIRMWARE_STATUS 46
37 #define MAX_LOGICAL_DRIVES 8
38 #define MAX_CHANNEL 5
39 #define MAX_TARGET 15
40 #define MAX_PHYSICAL_DRIVES MAX_CHANNEL*MAX_TARGET
42 #define INQUIRY_DATA_SIZE 0x24
43 #define MAX_CDB_LEN 0x0A
44 #define MAX_REQ_SENSE_LEN 0x20
46 #define INTR_VALID 0x40
48 /* Mailbox commands */
49 #define MEGA_MBOXCMD_LREAD 0x01
50 #define MEGA_MBOXCMD_LWRITE 0x02
51 #define MEGA_MBOXCMD_PASSTHRU 0x03
52 #define MEGA_MBOXCMD_ADAPTERINQ 0x05
54 /* Offsets into Mailbox */
55 #define COMMAND_PORT 0x00
56 #define COMMAND_ID_PORT 0x01
57 #define SG_LIST_PORT0 0x08
58 #define SG_LIST_PORT1 0x09
59 #define SG_LIST_PORT2 0x0a
60 #define SG_LIST_PORT3 0x0b
61 #define SG_ELEMENT_PORT 0x0d
62 #define NO_FIRED_PORT 0x0f
64 /* I/O Port offsets */
65 #define I_CMD_PORT 0x00
66 #define I_ACK_PORT 0x00
67 #define I_TOGGLE_PORT 0x01
68 #define INTR_PORT 0x0a
70 #define MAILBOX_SIZE (sizeof(mega_mailbox)-16)
71 #define MBOX_BUSY_PORT 0x00
72 #define MBOX_PORT0 0x04
73 #define MBOX_PORT1 0x05
74 #define MBOX_PORT2 0x06
75 #define MBOX_PORT3 0x07
76 #define ENABLE_MBOX_REGION 0x0B
78 /* I/O Port Values */
79 #define ISSUE_BYTE 0x10
80 #define ACK_BYTE 0x08
81 #define ENABLE_INTR_BYTE 0xc0
82 #define DISABLE_INTR_BYTE 0x00
83 #define VALID_INTR_BYTE 0x40
84 #define MBOX_BUSY_BYTE 0x10
85 #define ENABLE_MBOX_BYTE 0x00
87 /* Setup some port macros here */
88 #define WRITE_MAILBOX(base,offset,value) *(base+offset)=value
89 #define READ_MAILBOX(base,offset) *(base+offset)
91 #define WRITE_PORT(base,offset,value) outb_p(value,base+offset)
92 #define READ_PORT(base,offset) inb_p(base+offset)
94 #define ISSUE_COMMAND(base) WRITE_PORT(base,I_CMD_PORT,ISSUE_BYTE)
95 #define CLEAR_INTR(base) WRITE_PORT(base,I_ACK_PORT,ACK_BYTE)
96 #define ENABLE_INTR(base) WRITE_PORT(base,I_TOGGLE_PORT,ENABLE_INTR_BYTE)
97 #define DISABLE_INTR(base) WRITE_PORT(base,I_TOGGLE_PORT,DISABLE_INTR_BYTE)
99 /* Define AMI's PCI codes */
100 #undef PCI_VENDOR_ID_AMI
101 #undef PCI_DEVICE_ID_AMI_MEGARAID
103 #ifndef PCI_VENDOR_ID_AMI
104 #define PCI_VENDOR_ID_AMI 0x101E
105 #define PCI_DEVICE_ID_AMI_MEGARAID 0x9010
106 #endif
108 #define PCI_CONF_BASE_ADDR_OFFSET 0x10
109 #define PCI_CONF_IRQ_OFFSET 0x3c
110 #define PCI_CONF_AMISIG 0xa0
111 #define AMI_SIGNATURE 0x3344
112 #define AMI_SIGNATURE_471 0xCCCC
114 #if LINUX_VERSION_CODE < 0x20100
115 #define MEGARAID \
116 { NULL, /* Next */\
117 NULL, /* Usage Count Pointer */\
118 NULL, /* /proc Directory Entry */\
119 megaraid_proc_info, /* /proc Info Function */\
120 "MegaRAID", /* Driver Name */\
121 megaraid_detect, /* Detect Host Adapter */\
122 megaraid_release, /* Release Host Adapter */\
123 megaraid_info, /* Driver Info Function */\
124 megaraid_command, /* Command Function */\
125 megaraid_queue, /* Queue Command Function */\
126 megaraid_abort, /* Abort Command Function */\
127 megaraid_reset, /* Reset Command Function */\
128 NULL, /* Slave Attach Function */\
129 megaraid_biosparam, /* Disk BIOS Parameters */\
130 MAX_COMMANDS, /* # of cmds that can be\
131 outstanding at any time */\
132 7, /* HBA Target ID */\
133 MAX_SGLIST, /* Scatter/Gather Table Size */\
134 MAX_CMD_PER_LUN, /* SCSI Commands per LUN */\
135 0, /* Present */\
136 0, /* Default Unchecked ISA DMA */\
137 ENABLE_CLUSTERING } /* Enable Clustering */
138 #else
139 #define MEGARAID \
141 name: "MegaRAID", /* Driver Name */\
142 proc_info: megaraid_proc_info, /* /proc driver info */\
143 detect: megaraid_detect, /* Detect Host Adapter */\
144 release: megaraid_release, /* Release Host Adapter */\
145 info: megaraid_info, /* Driver Info Function */\
146 command: megaraid_command, /* Command Function */\
147 queuecommand: megaraid_queue, /* Queue Command Function */\
148 abort: megaraid_abort, /* Abort Command Function */\
149 reset: megaraid_reset, /* Reset Command Function */\
150 bios_param: megaraid_biosparam, /* Disk BIOS Parameters */\
151 can_queue: MAX_COMMANDS, /* Can Queue */\
152 this_id: 7, /* HBA Target ID */\
153 sg_tablesize: MAX_SGLIST, /* Scatter/Gather Table Size */\
154 cmd_per_lun: MAX_CMD_PER_LUN, /* SCSI Commands per LUN */\
155 present: 0, /* Present */\
156 unchecked_isa_dma:0, /* Default Unchecked ISA DMA */\
157 use_clustering: ENABLE_CLUSTERING /* Enable Clustering */\
159 #endif
162 /***********************************************************************
163 * Structure Declarations for the Firmware supporting 40 Logical Drives
164 * and 256 Physical Drives.
165 ***********************************************************************/
167 #define FC_MAX_LOGICAL_DRIVES 40
168 #define FC_MAX_LOG_DEVICES FC_MAX_LOGICAL_DRIVES
169 #define FC_MAX_SPAN_DEPTH 8
170 #define FC_MAX_ROW_SIZE 32
172 #define FC_MAX_CHANNELS 16
173 #define FC_MAX_TARGETS_PER_CHANNEL 16
174 #define FC_MAX_PHYSICAL_DEVICES 256
176 #define FC_NEW_CONFIG 0xA1
177 #define DCMD_FC_CMD 0xA1
178 #define NC_SUBOP_PRODUCT_INFO 0x0E
179 #define NC_SUBOP_ENQUIRY3 0x0F
180 #define ENQ3_GET_SOLICITED_NOTIFY_ONLY 0x01
181 #define ENQ3_GET_SOLICITED_FULL 0x02
182 #define ENQ3_GET_UNSOLICITED 0x03
185 /********************************************
186 * PRODUCT_INFO Strucure
187 ********************************************/
189 #define SIG_40LOG_32STR_8SPN 0x00282008
192 * Utilities declare this strcture size as 1024 bytes. So more fields can
193 * be added in future.
196 struct MRaidProductInfo
198 u32 DataSize; /* current size in bytes (not including resvd) */
199 u32 ConfigSignature;
200 /* Current value is 0x00282008
201 * 0x28=MAX_LOGICAL_DRIVES,
202 * 0x20=Number of stripes and
203 * 0x08=Number of spans */
204 u8 FwVer[16]; /* printable ASCI string */
205 u8 BiosVer[16]; /* printable ASCI string */
206 u8 ProductName[80]; /* printable ASCI string */
208 u8 MaxConcCmds; /* Max. concurrent commands supported */
209 u8 SCSIChanPresent; /* Number of SCSI Channels detected */
210 u8 FCLoopPresent; /* Number of Fibre Loops detected */
211 u8 memType; /* EDO, FPM, SDRAM etc */
213 u32 signature;
214 u16 DramSize; /* In terms of MB */
215 u16 subSystemID;
217 u16 subSystemVendorID;
218 u8 numNotifyCounters;
219 u8 pad1k[889]; /* 135 + 889 resvd = 1024 total size */
220 }__attribute__((packed));
221 typedef struct MRaidProductInfo megaRaidProductInfo;
223 /********************************************
224 * Standard ENQUIRY Strucure
225 ********************************************/
226 struct FC_ADP_INFO
228 u8 MaxConcCmds; /* Max. concurrent commands supported. */
229 u8 RbldRate; /* Rebuild Rate. Varies from 0%-100% */
230 u8 MaxTargPerChan; /* Max. Targets supported per chan. */
231 u8 ChanPresent; /* No. of Chans present on this adapter. */
232 u8 FwVer[4]; /* Firmware version. */
233 u16 AgeOfFlash; /* No. of times FW has been downloaded. */
234 u8 ChipSetValue; /* Contents of 0xC0000832 */
235 u8 DramSize; /* In terms of MB */
236 u8 CacheFlushInterval; /* In terms of Seconds */
237 u8 BiosVersion[4];
238 u8 BoardType;
239 u8 sense_alert;
240 u8 write_config_count; /* Increase with evry configuration change */
241 u8 drive_inserted_count; /* Increase with every drive inserted */
242 u8 inserted_drive; /* Channel: Id of inserted drive */
243 u8 battery_status;
245 BIT 0 : battery module missing
246 BIT 1 : VBAD
247 BIT 2 : temp high
248 BIT 3 : battery pack missing
249 BIT 4,5 : 00 - charge complete
250 01 - fast charge in prog
251 10 - fast charge fail
252 11 - undefined
253 BIt 6 : counter > 1000
254 Bit 7 : undefined
256 u8 dec_fault_bus_info; /* was resvd */
257 }__attribute__((packed));
259 struct FC_LDRV_INFO
261 u8 NumLDrv; /* No. of Log. Drvs configured. */
262 u8 recon_state[FC_MAX_LOGICAL_DRIVES/8];
263 /* bit field for State of reconstruct */
264 u16 LDrvOpStatus[FC_MAX_LOGICAL_DRIVES/8];
265 /* bit field Status of Long Operations. */
267 u32 LDrvSize[FC_MAX_LOGICAL_DRIVES]; /* Size of each log. Drv. */
268 u8 LDrvProp[FC_MAX_LOGICAL_DRIVES];
269 u8 LDrvState[FC_MAX_LOGICAL_DRIVES]; /* State of Logical Drives. */
270 }__attribute__((packed));
272 #define PREVSTAT_MASK 0xf0
273 #define CURRSTAT_MASK 0x0f
275 struct FC_PDRV_INFO
277 u8 PDrvState[FC_MAX_PHYSICAL_DEVICES]; /* State of Phys Drvs. */
278 }__attribute__((packed));
281 struct FC_AdapterInq
283 struct FC_ADP_INFO AdpInfo;
284 struct FC_LDRV_INFO LogdrvInfo;
285 struct FC_PDRV_INFO PhysdrvInfo;
286 }__attribute__((packed));
289 typedef struct FC_AdapterInq mega_RAIDINQ_FC;
291 /********************************************
292 * NOTIFICATION Strucure
293 ********************************************/
295 #define MAX_NOTIFY_SIZE 0x80
296 #define CUR_NOTIFY_SIZE sizeof(struct MegaRAID_Notify)
299 * Utilities declare this strcture size as ?? bytes. So more fields can
300 * be added in future.
302 struct MegaRAID_Notify
304 u32 globalCounter; /* Any change increments this counter */
306 u8 paramCounter; /* Indicates any params changed */
307 u8 paramId; /* Param modified - defined below */
308 u16 paramVal; /* New val of last param modified */
310 u8 writeConfigCounter; /* write config occurred */
311 u8 writeConfigRsvd[3];
313 u8 ldrvOpCounter; /* Indicates ldrv op started/completed */
314 u8 ldrvOpId; /* ldrv num */
315 u8 ldrvOpCmd; /* ldrv operation - defined below */
316 u8 ldrvOpStatus; /* status of the operation */
318 u8 ldrvStateCounter; /* Indicates change of ldrv state */
319 u8 ldrvStateId; /* ldrv num */
320 u8 ldrvStateNew; /* New state */
321 u8 ldrvStateOld; /* old state */
323 u8 pdrvStateCounter; /* Indicates change of ldrv state */
324 u8 pdrvStateId; /* pdrv id */
325 u8 pdrvStateNew; /* New state */
326 u8 pdrvStateOld; /* old state */
328 u8 pdrvFmtCounter; /* Indicates pdrv format started/over */
329 u8 pdrvFmtId; /* pdrv id */
330 u8 pdrvFmtVal; /* format started/over */
331 u8 pdrvFmtRsvd;
333 u8 targXferCounter; /* Indicates SCSI-2 Xfer rate change */
334 u8 targXferId; /* pdrv Id */
335 u8 targXferVal; /* new Xfer params of last pdrv */
336 u8 targXferRsvd;
338 u8 fcLoopIdChgCounter; /* Indicates loopid changed */
339 u8 fcLoopIdPdrvId; /* pdrv id */
340 u8 fcLoopId0; /* loopid on fc loop 0 */
341 u8 fcLoopId1; /* loopid on fc loop 1 */
343 u8 fcLoopStateCounter; /* Indicates loop state changed */
344 u8 fcLoopState0; /* state of fc loop 0 */
345 u8 fcLoopState1; /* state of fc loop 1 */
346 u8 fcLoopStateRsvd;
347 }__attribute__((packed));
350 /********************************************
351 * PARAM IDs in Notify struct
352 ********************************************/
353 #define PARAM_RBLD_RATE 0x01
354 /*--------------------------------------
355 * Param val =
356 * byte 0: new rbld rate
357 *--------------------------------------*/
358 #define PARAM_CACHE_FLUSH_INTERVAL 0x02
359 /*--------------------------------------
360 * Param val =
361 * byte 0: new cache flush interval
362 *--------------------------------------*/
363 #define PARAM_SENSE_ALERT 0x03
364 /*--------------------------------------
365 * Param val =
366 * byte 0: last pdrv id causing chkcond
367 *--------------------------------------*/
368 #define PARAM_DRIVE_INSERTED 0x04
369 /*--------------------------------------
370 * Param val =
371 * byte 0: last pdrv id inserted
372 *--------------------------------------*/
373 #define PARAM_BATTERY_STATUS 0x05
374 /*--------------------------------------
375 * Param val =
376 * byte 0: battery status
377 *--------------------------------------*/
379 /********************************************
380 * Ldrv operation cmd in Notify struct
381 ********************************************/
382 #define LDRV_CMD_CHKCONSISTANCY 0x01
383 #define LDRV_CMD_INITIALIZE 0x02
384 #define LDRV_CMD_RECONSTRUCTION 0x03
386 /********************************************
387 * Ldrv operation status in Notify struct
388 ********************************************/
389 #define LDRV_OP_SUCCESS 0x00
390 #define LDRV_OP_FAILED 0x01
391 #define LDRV_OP_ABORTED 0x02
392 #define LDRV_OP_CORRECTED 0x03
393 #define LDRV_OP_STARTED 0x04
396 /********************************************
397 * Raid Logical drive states.
398 ********************************************/
399 #define RDRV_OFFLINE 0
400 #define RDRV_DEGRADED 1
401 #define RDRV_OPTIMAL 2
402 #define RDRV_DELETED 3
404 /*******************************************
405 * Physical drive states.
406 *******************************************/
407 #define PDRV_UNCNF 0
408 #define PDRV_ONLINE 3
409 #define PDRV_FAILED 4
410 #define PDRV_RBLD 5
411 /* #define PDRV_HOTSPARE 6 */
413 /*******************************************
414 * Formal val in Notify struct
415 *******************************************/
416 #define PDRV_FMT_START 0x01
417 #define PDRV_FMT_OVER 0x02
419 /********************************************
420 * FC Loop State in Notify Struct
421 ********************************************/
422 #define ENQ_FCLOOP_FAILED 0
423 #define ENQ_FCLOOP_ACTIVE 1
424 #define ENQ_FCLOOP_TRANSIENT 2
426 /********************************************
427 * ENQUIRY3 Strucure
428 ********************************************/
430 * Utilities declare this strcture size as 1024 bytes. So more fields can
431 * be added in future.
433 struct MegaRAID_Enquiry3
435 u32 dataSize; /* current size in bytes (not including resvd) */
437 struct MegaRAID_Notify notify;
439 u8 notifyRsvd[MAX_NOTIFY_SIZE - CUR_NOTIFY_SIZE];
441 u8 rbldRate; /* Rebuild rate (0% - 100%) */
442 u8 cacheFlushInterval; /* In terms of Seconds */
443 u8 senseAlert;
444 u8 driveInsertedCount; /* drive insertion count */
446 u8 batteryStatus;
447 u8 numLDrv; /* No. of Log Drives configured */
448 u8 reconState[FC_MAX_LOGICAL_DRIVES/8]; /* State of reconstruct */
449 u16 lDrvOpStatus[FC_MAX_LOGICAL_DRIVES/8]; /* log. Drv Status */
451 u32 lDrvSize[FC_MAX_LOGICAL_DRIVES]; /* Size of each log. Drv */
452 u8 lDrvProp[FC_MAX_LOGICAL_DRIVES];
453 u8 lDrvState[FC_MAX_LOGICAL_DRIVES]; /* State of Logical Drives */
454 u8 pDrvState[FC_MAX_PHYSICAL_DEVICES]; /* State of Phys. Drvs. */
455 u16 physDrvFormat[FC_MAX_PHYSICAL_DEVICES/16];
457 u8 targXfer[80]; /* phys device transfer rate */
458 u8 pad1k[263]; /* 761 + 263reserved = 1024 bytes total size */
459 }__attribute__((packed));
460 typedef struct MegaRAID_Enquiry3 mega_Enquiry3;
462 /* Structures */
463 typedef struct _mega_ADP_INFO {
464 u8 MaxConcCmds;
465 u8 RbldRate;
466 u8 MaxTargPerChan;
467 u8 ChanPresent;
468 u8 FwVer[4];
469 u16 AgeOfFlash;
470 u8 ChipSetValue;
471 u8 DramSize;
472 u8 CacheFlushInterval;
473 u8 BiosVer[4];
474 u8 resvd[7];
475 } mega_ADP_INFO;
477 typedef struct _mega_LDRV_INFO {
478 u8 NumLDrv;
479 u8 resvd[3];
480 u32 LDrvSize[MAX_LOGICAL_DRIVES];
481 u8 LDrvProp[MAX_LOGICAL_DRIVES];
482 u8 LDrvState[MAX_LOGICAL_DRIVES];
483 } mega_LDRV_INFO;
485 typedef struct _mega_PDRV_INFO {
486 u8 PDrvState[MAX_PHYSICAL_DRIVES];
487 u8 resvd;
488 } mega_PDRV_INFO;
490 // RAID inquiry: Mailbox command 0x5
491 typedef struct _mega_RAIDINQ {
492 mega_ADP_INFO AdpInfo;
493 mega_LDRV_INFO LogdrvInfo;
494 mega_PDRV_INFO PhysdrvInfo;
495 } mega_RAIDINQ;
497 // Passthrough command: Mailbox command 0x3
498 typedef struct mega_passthru {
499 u8 timeout:3; /* 0=6sec/1=60sec/2=10min/3=3hrs */
500 u8 ars:1;
501 u8 reserved:3;
502 u8 islogical:1;
503 u8 logdrv; /* if islogical == 1 */
504 u8 channel; /* if islogical == 0 */
505 u8 target; /* if islogical == 0 */
506 u8 queuetag; /* unused */
507 u8 queueaction; /* unused */
508 u8 cdb[MAX_CDB_LEN];
509 u8 cdblen;
510 u8 reqsenselen;
511 u8 reqsensearea[MAX_REQ_SENSE_LEN];
512 u8 numsgelements;
513 u8 scsistatus;
514 u32 dataxferaddr;
515 u32 dataxferlen;
516 } mega_passthru;
518 struct _mega_mailbox {
519 /* 0x0 */ u8 cmd;
520 /* 0x1 */ u8 cmdid;
521 /* 0x2 */ u16 numsectors;
522 /* 0x4 */ u32 lba;
523 /* 0x8 */ u32 xferaddr;
524 /* 0xC */ u8 logdrv;
525 /* 0xD */ u8 numsgelements;
526 /* 0xE */ u8 resvd;
527 /* 0xF */ u8 busy;
528 /* 0x10 */ u8 numstatus;
529 /* 0x11 */ u8 status;
530 /* 0x12 */ u8 completed[46];
531 u8 mraid_poll;
532 u8 mraid_ack;
533 u8 pad[16]; /* for alignment purposes */
534 }__attribute__((packed));
535 typedef struct _mega_mailbox mega_mailbox;
537 typedef struct {
538 u32 xferSegment; /* for 64-bit controllers */
539 mega_mailbox mailbox;
540 } mega_mailbox64;
542 typedef struct _mega_ioctl_mbox {
543 /* 0x0 */ u8 cmd;
544 /* 0x1 */ u8 cmdid;
545 /* 0x2 */ u8 channel;
546 /* 0x3 */ u8 param;
547 /* 0x4 */ u8 pad[4];
548 /* 0x8 */ u32 xferaddr;
549 /* 0xC */ u8 logdrv;
550 /* 0xD */ u8 numsgelements;
551 /* 0xE */ u8 resvd;
552 /* 0xF */ u8 busy;
553 /* 0x10 */ u8 numstatus;
554 /* 0x11 */ u8 status;
555 /* 0x12 */ u8 completed[46];
556 u8 mraid_poll;
557 u8 mraid_ack;
558 u8 malign[16];
559 } mega_ioctl_mbox;
561 typedef struct _mega_sglist {
562 u32 address;
563 u32 length;
564 } mega_sglist;
566 /* Queued command data */
567 typedef struct _mega_scb mega_scb;
569 struct _mega_scb {
570 int idx;
571 u32 state;
572 u32 isrcount;
573 u8 mboxData[16];
574 mega_passthru pthru;
575 Scsi_Cmnd *SCpnt;
576 mega_sglist *sgList;
577 char *kern_area; /* Only used for large ioctl xfers */
578 struct wait_queue *ioctl_wait;
579 struct semaphore sem;
580 mega_scb *next;
583 /* Per-controller data */
584 typedef struct _mega_host_config {
585 u8 numldrv;
586 u32 flag;
587 u32 base;
589 mega_scb *qFreeH;
590 mega_scb *qFreeT;
591 mega_scb *qPendingH;
592 mega_scb *qPendingT;
594 Scsi_Cmnd *qCompletedH;
595 Scsi_Cmnd *qCompletedT;
596 u32 qFcnt;
597 u32 qPcnt;
598 u32 qCcnt;
600 u32 nReads[FC_MAX_LOGICAL_DRIVES];
601 u32 nWrites[FC_MAX_LOGICAL_DRIVES];
603 /* Host adapter parameters */
604 u8 fwVer[7];
605 u8 biosVer[7];
607 struct Scsi_Host *host;
609 volatile mega_mailbox64 *mbox64; /* ptr to beginning of 64-bit mailbox */
610 volatile mega_mailbox *mbox; /* ptr to beginning of standard mailbox */
611 volatile mega_mailbox64 mailbox64;
612 #if 0
613 volatile union {
614 u8 generic_buffer[2 * 1024L];
615 mega_RAIDINQ adapterInfoData;
616 mega_Enquiry3 enquiry3Data;
617 }mega_buffer;
618 #else
619 volatile u8 mega_buffer[2*1024L];
620 #endif
621 volatile megaRaidProductInfo productInfo;
623 u8 max_cmds;
624 mega_scb scbList[MAX_COMMANDS];
625 } mega_host_config;
627 const char *megaraid_info(struct Scsi_Host *);
628 int megaraid_detect(Scsi_Host_Template *);
629 int megaraid_release(struct Scsi_Host *);
630 int megaraid_command(Scsi_Cmnd *);
631 int megaraid_abort(Scsi_Cmnd *);
632 int megaraid_reset(Scsi_Cmnd *, unsigned int);
633 int megaraid_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
634 int megaraid_biosparam(Disk *, kdev_t, int *);
635 int megaraid_proc_info(char *buffer, char **start, off_t offset,
636 int length, int hostno, int inout);
638 #endif