compat_ioctl: pass compat pointer directly to handlers
[safe/jmp/linux-2.6] / drivers / block / cciss_cmd.h
index 4af7c4c..6afa700 100644 (file)
@@ -5,9 +5,10 @@
 //###########################################################################
 #define CISS_VERSION "1.00"
 
-//general boundary defintions
+//general boundary definitions
 #define SENSEINFOBYTES          32//note that this value may vary between host implementations
-#define MAXSGENTRIES            31
+#define MAXSGENTRIES            32
+#define CCISS_SG_CHAIN          0x80000000
 #define MAXREPLYQS              256
 
 //Command Status value
 #define CMD_TIMEOUT             0x000B
 #define CMD_UNABORTABLE                0x000C
 
+/* Unit Attentions ASC's as defined for the MSA2012sa */
+#define POWER_OR_RESET                 0x29
+#define STATE_CHANGED                  0x2a
+#define UNIT_ATTENTION_CLEARED         0x2f
+#define LUN_FAILED                     0x3e
+#define REPORT_LUNS_CHANGED            0x3f
+
+/* Unit Attentions ASCQ's as defined for the MSA2012sa */
+
+       /* These ASCQ's defined for ASC = POWER_OR_RESET */
+#define POWER_ON_RESET                 0x00
+#define POWER_ON_REBOOT                        0x01
+#define SCSI_BUS_RESET                 0x02
+#define MSA_TARGET_RESET               0x03
+#define CONTROLLER_FAILOVER            0x04
+#define TRANSCEIVER_SE                 0x05
+#define TRANSCEIVER_LVD                        0x06
+
+       /* These ASCQ's defined for ASC = STATE_CHANGED */
+#define RESERVATION_PREEMPTED          0x03
+#define ASYM_ACCESS_CHANGED            0x06
+#define LUN_CAPACITY_CHANGED           0x09
+
 //transfer direction
 #define XFER_NONE               0x00
 #define XFER_WRITE              0x01
@@ -55,6 +79,7 @@
 #define I2O_INT_MASK            0x34
 #define I2O_IBPOST_Q            0x40
 #define I2O_OBPOST_Q            0x44
+#define I2O_DMA1_CFG           0x214
 
 //Configuration Table
 #define CFGTBL_ChangeReq        0x00000001l
@@ -88,7 +113,7 @@ typedef union _u64bit
 //###########################################################################
 //STRUCTURES
 //###########################################################################
-#define CISS_MAX_LUN   16      
+#define CISS_MAX_LUN   1024
 #define CISS_MAX_PHYS_LUN      1024
 // SCSI-3 Cmmands 
 
@@ -193,6 +218,8 @@ typedef union _LUNAddr_struct {
   LogDevAddr_struct  LogDev;
 } LUNAddr_struct;
 
+#define CTLR_LUNID "\0\0\0\0\0\0\0\0"
+
 typedef struct _CommandListHeader_struct {
   BYTE              ReplyQueue;
   BYTE              SGList;
@@ -248,6 +275,7 @@ typedef struct _ErrorInfo_struct {
 #define CMD_SCSI       0x03
 #define CMD_MSG_DONE   0x04
 #define CMD_MSG_TIMEOUT 0x05
+#define CMD_MSG_STALE  0xff
 
 /* This structure needs to be divisible by 8 for new
  * indexing method.
@@ -264,8 +292,7 @@ typedef struct _CommandList_struct {
   int                     ctlr;
   int                     cmd_type; 
   long                    cmdindex;
-  struct _CommandList_struct *prev;
-  struct _CommandList_struct *next;
+  struct hlist_node list;
   struct request *        rq;
   struct completion *waiting;
   int   retry_count;
@@ -293,6 +320,10 @@ typedef struct _CfgTable_struct {
   BYTE             ServerName[16];
   DWORD            HeartBeat;
   DWORD            SCSI_Prefetch;
+  DWORD            MaxSGElements;
+  DWORD            MaxLogicalUnits;
+  DWORD            MaxPhysicalDrives;
+  DWORD            MaxPhysicalDrivesPerLogicalUnit;
 } CfgTable_struct;
 #pragma pack()  
 #endif // CCISS_CMD_H