summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid.h')
-rw-r--r--drivers/scsi/megaraid.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
index a4771100e..9a8935935 100644
--- a/drivers/scsi/megaraid.h
+++ b/drivers/scsi/megaraid.h
@@ -8,9 +8,11 @@
#define IN_ISR 0x80000000L
#define IN_ABORT 0x40000000L
#define IN_RESET 0x20000000L
+#define IN_QUEUE 0x10000000L
#define BOARD_QUARTZ 0x08000000L
#define BOARD_40LD 0x04000000L
+#ifndef HOSTS_C
#define SCB_FREE 0x0
#define SCB_ACTIVE 0x1
#define SCB_WAITQ 0x2
@@ -18,12 +20,19 @@
#define SCB_COMPLETE 0x4
#define SCB_ABORTED 0x5
#define SCB_RESET 0x6
+#endif
#define MEGA_CMD_TIMEOUT 10
-#define MAX_SGLIST 17
-#define MAX_COMMANDS 250
+/* Feel free to fiddle with these.. max values are:
+ SGLIST 0..26
+ COMMANDS 0..253
+ CMDPERLUN 0..63
+*/
+#define MAX_SGLIST 0x1A
+#define MAX_COMMANDS 127
#define MAX_CMD_PER_LUN 63
+#define MAX_FIRMWARE_STATUS 46
#define MAX_LOGICAL_DRIVES 8
#define MAX_CHANNEL 5
@@ -143,8 +152,8 @@
sg_tablesize: MAX_SGLIST, /* Scatter/Gather Table Size */\
cmd_per_lun: MAX_CMD_PER_LUN, /* SCSI Commands per LUN */\
present: 0, /* Present */\
- unchecked_isa_dma:0, /* Default Unchecked ISA DMA */\
- use_clustering: ENABLE_CLUSTERING /* Enable Clustering */\
+ unchecked_isa_dma:1, /* Default Unchecked ISA DMA */\
+ use_clustering: ENABLE_CLUSTERING /* Enable Clustering */\
}
#endif
@@ -505,7 +514,7 @@ typedef struct mega_passthru {
u32 dataxferlen;
} mega_passthru;
-typedef struct _mega_mailbox {
+struct _mega_mailbox {
/* 0x0 */ u8 cmd;
/* 0x1 */ u8 cmdid;
/* 0x2 */ u16 numsectors;
@@ -520,8 +529,9 @@ typedef struct _mega_mailbox {
/* 0x12 */ u8 completed[46];
u8 mraid_poll;
u8 mraid_ack;
- u8 pad[16];
-} mega_mailbox;
+ u8 pad[16]; /* for alignment purposes */
+}__attribute__((packed));
+typedef struct _mega_mailbox mega_mailbox;
typedef struct {
u32 xferSegment; /* for 64-bit controllers */
@@ -575,8 +585,16 @@ typedef struct _mega_host_config {
u32 flag;
u32 base;
- mega_scb *qFree;
- mega_scb *qPending;
+ mega_scb *qFreeH;
+ mega_scb *qFreeT;
+ mega_scb *qPendingH;
+ mega_scb *qPendingT;
+
+ Scsi_Cmnd *qCompletedH;
+ Scsi_Cmnd *qCompletedT;
+ u32 qFcnt;
+ u32 qPcnt;
+ u32 qCcnt;
u32 nReads[FC_MAX_LOGICAL_DRIVES];
u32 nWrites[FC_MAX_LOGICAL_DRIVES];