aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aacraid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r--drivers/scsi/aacraid/aacraid.h468
1 files changed, 280 insertions, 188 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 700d90331c1c..42484417cef7 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -8,12 +8,18 @@
8 8
9#define MAXIMUM_NUM_CONTAINERS 32 9#define MAXIMUM_NUM_CONTAINERS 32
10 10
11#define AAC_NUM_FIB (256 + 64) 11#define AAC_NUM_MGT_FIB 8
12#define AAC_NUM_IO_FIB 100 12#define AAC_NUM_IO_FIB (512 - AAC_NUM_MGT_FIB)
13#define AAC_NUM_FIB (AAC_NUM_IO_FIB + AAC_NUM_MGT_FIB)
13 14
14#define AAC_MAX_LUN (8) 15#define AAC_MAX_LUN (8)
15 16
16#define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff) 17#define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff)
18/*
19 * max_sectors is an unsigned short, otherwise limit is 0x100000000 / 512
20 * Linux has starvation problems if we permit larger than 4MB I/O ...
21 */
22#define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)8192)
17 23
18/* 24/*
19 * These macros convert from physical channels to virtual channels 25 * These macros convert from physical channels to virtual channels
@@ -89,11 +95,21 @@ struct diskparm
89 * on 64 bit systems not all cards support the 64 bit version 95 * on 64 bit systems not all cards support the 64 bit version
90 */ 96 */
91struct sgentry { 97struct sgentry {
98 __le32 addr; /* 32-bit address. */
99 __le32 count; /* Length. */
100};
101
102struct user_sgentry {
92 u32 addr; /* 32-bit address. */ 103 u32 addr; /* 32-bit address. */
93 u32 count; /* Length. */ 104 u32 count; /* Length. */
94}; 105};
95 106
96struct sgentry64 { 107struct sgentry64 {
108 __le32 addr[2]; /* 64-bit addr. 2 pieces for data alignment */
109 __le32 count; /* Length. */
110};
111
112struct user_sgentry64 {
97 u32 addr[2]; /* 64-bit addr. 2 pieces for data alignment */ 113 u32 addr[2]; /* 64-bit addr. 2 pieces for data alignment */
98 u32 count; /* Length. */ 114 u32 count; /* Length. */
99}; 115};
@@ -106,15 +122,25 @@ struct sgentry64 {
106 */ 122 */
107 123
108struct sgmap { 124struct sgmap {
109 u32 count; 125 __le32 count;
110 struct sgentry sg[1]; 126 struct sgentry sg[1];
111}; 127};
112 128
113struct sgmap64 { 129struct user_sgmap {
114 u32 count; 130 u32 count;
131 struct user_sgentry sg[1];
132};
133
134struct sgmap64 {
135 __le32 count;
115 struct sgentry64 sg[1]; 136 struct sgentry64 sg[1];
116}; 137};
117 138
139struct user_sgmap64 {
140 u32 count;
141 struct user_sgentry64 sg[1];
142};
143
118struct creation_info 144struct creation_info
119{ 145{
120 u8 buildnum; /* e.g., 588 */ 146 u8 buildnum; /* e.g., 588 */
@@ -123,14 +149,14 @@ struct creation_info
123 * 2 = API 149 * 2 = API
124 */ 150 */
125 u8 year; /* e.g., 1997 = 97 */ 151 u8 year; /* e.g., 1997 = 97 */
126 u32 date; /* 152 __le32 date; /*
127 * unsigned Month :4; // 1 - 12 153 * unsigned Month :4; // 1 - 12
128 * unsigned Day :6; // 1 - 32 154 * unsigned Day :6; // 1 - 32
129 * unsigned Hour :6; // 0 - 23 155 * unsigned Hour :6; // 0 - 23
130 * unsigned Minute :6; // 0 - 60 156 * unsigned Minute :6; // 0 - 60
131 * unsigned Second :6; // 0 - 60 157 * unsigned Second :6; // 0 - 60
132 */ 158 */
133 u32 serial[2]; /* e.g., 0x1DEADB0BFAFAF001 */ 159 __le32 serial[2]; /* e.g., 0x1DEADB0BFAFAF001 */
134}; 160};
135 161
136 162
@@ -175,8 +201,8 @@ struct creation_info
175 */ 201 */
176 202
177struct aac_entry { 203struct aac_entry {
178 u32 size; /* Size in bytes of Fib which this QE points to */ 204 __le32 size; /* Size in bytes of Fib which this QE points to */
179 u32 addr; /* Receiver address of the FIB */ 205 __le32 addr; /* Receiver address of the FIB */
180}; 206};
181 207
182/* 208/*
@@ -185,9 +211,10 @@ struct aac_entry {
185 */ 211 */
186 212
187struct aac_qhdr { 213struct aac_qhdr {
188 u64 header_addr; /* Address to hand the adapter to access to this queue head */ 214 __le64 header_addr;/* Address to hand the adapter to access
189 u32 *producer; /* The producer index for this queue (host address) */ 215 to this queue head */
190 u32 *consumer; /* The consumer index for this queue (host address) */ 216 __le32 *producer; /* The producer index for this queue (host address) */
217 __le32 *consumer; /* The consumer index for this queue (host address) */
191}; 218};
192 219
193/* 220/*
@@ -261,29 +288,30 @@ enum aac_queue_types {
261 */ 288 */
262 289
263struct aac_fibhdr { 290struct aac_fibhdr {
264 u32 XferState; // Current transfer state for this CCB 291 __le32 XferState; /* Current transfer state for this CCB */
265 u16 Command; // Routing information for the destination 292 __le16 Command; /* Routing information for the destination */
266 u8 StructType; // Type FIB 293 u8 StructType; /* Type FIB */
267 u8 Flags; // Flags for FIB 294 u8 Flags; /* Flags for FIB */
268 u16 Size; // Size of this FIB in bytes 295 __le16 Size; /* Size of this FIB in bytes */
269 u16 SenderSize; // Size of the FIB in the sender (for response sizing) 296 __le16 SenderSize; /* Size of the FIB in the sender
270 u32 SenderFibAddress; // Host defined data in the FIB 297 (for response sizing) */
271 u32 ReceiverFibAddress; // Logical address of this FIB for the adapter 298 __le32 SenderFibAddress; /* Host defined data in the FIB */
272 u32 SenderData; // Place holder for the sender to store data 299 __le32 ReceiverFibAddress;/* Logical address of this FIB for
300 the adapter */
301 u32 SenderData; /* Place holder for the sender to store data */
273 union { 302 union {
274 struct { 303 struct {
275 u32 _ReceiverTimeStart; // Timestamp for receipt of fib 304 __le32 _ReceiverTimeStart; /* Timestamp for
276 u32 _ReceiverTimeDone; // Timestamp for completion of fib 305 receipt of fib */
306 __le32 _ReceiverTimeDone; /* Timestamp for
307 completion of fib */
277 } _s; 308 } _s;
278 } _u; 309 } _u;
279}; 310};
280 311
281#define FIB_DATA_SIZE_IN_BYTES (512 - sizeof(struct aac_fibhdr))
282
283
284struct hw_fib { 312struct hw_fib {
285 struct aac_fibhdr header; 313 struct aac_fibhdr header;
286 u8 data[FIB_DATA_SIZE_IN_BYTES]; // Command specific data 314 u8 data[512-sizeof(struct aac_fibhdr)]; // Command specific data
287}; 315};
288 316
289/* 317/*
@@ -345,11 +373,12 @@ struct hw_fib {
345#define RequestAdapterInfo 703 373#define RequestAdapterInfo 703
346#define IsAdapterPaused 704 374#define IsAdapterPaused 704
347#define SendHostTime 705 375#define SendHostTime 705
348#define LastMiscCommand 706 376#define RequestSupplementAdapterInfo 706
377#define LastMiscCommand 707
349 378
350// 379/*
351// Commands that will target the failover level on the FSA adapter 380 * Commands that will target the failover level on the FSA adapter
352// 381 */
353 382
354enum fib_xfer_state { 383enum fib_xfer_state {
355 HostOwned = (1<<0), 384 HostOwned = (1<<0),
@@ -382,22 +411,32 @@ enum fib_xfer_state {
382 */ 411 */
383 412
384#define ADAPTER_INIT_STRUCT_REVISION 3 413#define ADAPTER_INIT_STRUCT_REVISION 3
414#define ADAPTER_INIT_STRUCT_REVISION_4 4 // rocket science
385 415
386struct aac_init 416struct aac_init
387{ 417{
388 u32 InitStructRevision; 418 __le32 InitStructRevision;
389 u32 MiniPortRevision; 419 __le32 MiniPortRevision;
390 u32 fsrev; 420 __le32 fsrev;
391 u32 CommHeaderAddress; 421 __le32 CommHeaderAddress;
392 u32 FastIoCommAreaAddress; 422 __le32 FastIoCommAreaAddress;
393 u32 AdapterFibsPhysicalAddress; 423 __le32 AdapterFibsPhysicalAddress;
394 u32 AdapterFibsVirtualAddress; 424 __le32 AdapterFibsVirtualAddress;
395 u32 AdapterFibsSize; 425 __le32 AdapterFibsSize;
396 u32 AdapterFibAlign; 426 __le32 AdapterFibAlign;
397 u32 printfbuf; 427 __le32 printfbuf;
398 u32 printfbufsiz; 428 __le32 printfbufsiz;
399 u32 HostPhysMemPages; // number of 4k pages of host physical memory 429 __le32 HostPhysMemPages; /* number of 4k pages of host
400 u32 HostElapsedSeconds; // number of seconds since 1970. 430 physical memory */
431 __le32 HostElapsedSeconds; /* number of seconds since 1970. */
432 /*
433 * ADAPTER_INIT_STRUCT_REVISION_4 begins here
434 */
435 __le32 InitFlags; /* flags for supported features */
436#define INITFLAGS_NEW_COMM_SUPPORTED 0x00000001
437 __le32 MaxIoCommands; /* max outstanding commands */
438 __le32 MaxIoSize; /* largest I/O command */
439 __le32 MaxFibSize; /* largest FIB to adapter */
401}; 440};
402 441
403enum aac_log_level { 442enum aac_log_level {
@@ -421,7 +460,7 @@ struct adapter_ops
421{ 460{
422 void (*adapter_interrupt)(struct aac_dev *dev); 461 void (*adapter_interrupt)(struct aac_dev *dev);
423 void (*adapter_notify)(struct aac_dev *dev, u32 event); 462 void (*adapter_notify)(struct aac_dev *dev, u32 event);
424 int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 *status); 463 int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4);
425 int (*adapter_check_health)(struct aac_dev *dev); 464 int (*adapter_check_health)(struct aac_dev *dev);
426}; 465};
427 466
@@ -541,6 +580,7 @@ struct sa_drawbridge_CSR {
541#define Mailbox3 SaDbCSR.MAILBOX3 580#define Mailbox3 SaDbCSR.MAILBOX3
542#define Mailbox4 SaDbCSR.MAILBOX4 581#define Mailbox4 SaDbCSR.MAILBOX4
543#define Mailbox5 SaDbCSR.MAILBOX5 582#define Mailbox5 SaDbCSR.MAILBOX5
583#define Mailbox6 SaDbCSR.MAILBOX6
544#define Mailbox7 SaDbCSR.MAILBOX7 584#define Mailbox7 SaDbCSR.MAILBOX7
545 585
546#define DoorbellReg_p SaDbCSR.PRISETIRQ 586#define DoorbellReg_p SaDbCSR.PRISETIRQ
@@ -763,29 +803,48 @@ struct fib {
763 803
764struct aac_adapter_info 804struct aac_adapter_info
765{ 805{
766 u32 platform; 806 __le32 platform;
767 u32 cpu; 807 __le32 cpu;
768 u32 subcpu; 808 __le32 subcpu;
769 u32 clock; 809 __le32 clock;
770 u32 execmem; 810 __le32 execmem;
771 u32 buffermem; 811 __le32 buffermem;
772 u32 totalmem; 812 __le32 totalmem;
773 u32 kernelrev; 813 __le32 kernelrev;
774 u32 kernelbuild; 814 __le32 kernelbuild;
775 u32 monitorrev; 815 __le32 monitorrev;
776 u32 monitorbuild; 816 __le32 monitorbuild;
777 u32 hwrev; 817 __le32 hwrev;
778 u32 hwbuild; 818 __le32 hwbuild;
779 u32 biosrev; 819 __le32 biosrev;
780 u32 biosbuild; 820 __le32 biosbuild;
781 u32 cluster; 821 __le32 cluster;
782 u32 clusterchannelmask; 822 __le32 clusterchannelmask;
783 u32 serial[2]; 823 __le32 serial[2];
784 u32 battery; 824 __le32 battery;
785 u32 options; 825 __le32 options;
786 u32 OEM; 826 __le32 OEM;
787}; 827};
788 828
829struct aac_supplement_adapter_info
830{
831 u8 AdapterTypeText[17+1];
832 u8 Pad[2];
833 __le32 FlashMemoryByteSize;
834 __le32 FlashImageId;
835 __le32 MaxNumberPorts;
836 __le32 Version;
837 __le32 FeatureBits;
838 u8 SlotNumber;
839 u8 ReservedPad0[0];
840 u8 BuildDate[12];
841 __le32 CurrentNumberPorts;
842 __le32 ReservedGrowth[24];
843};
844#define AAC_FEATURE_FALCON 0x00000010
845#define AAC_SIS_VERSION_V3 3
846#define AAC_SIS_SLOT_UNKNOWN 0xFF
847
789/* 848/*
790 * Battery platforms 849 * Battery platforms
791 */ 850 */
@@ -831,6 +890,12 @@ struct aac_dev
831 890
832 u16 irq_mask; 891 u16 irq_mask;
833 /* 892 /*
893 * negotiated FIB settings
894 */
895 unsigned max_fib_size;
896 unsigned sg_tablesize;
897
898 /*
834 * Map for 128 fib objects (64k) 899 * Map for 128 fib objects (64k)
835 */ 900 */
836 dma_addr_t hw_fib_pa; 901 dma_addr_t hw_fib_pa;
@@ -889,12 +954,14 @@ struct aac_dev
889 u32 aif_thread; 954 u32 aif_thread;
890 struct completion aif_completion; 955 struct completion aif_completion;
891 struct aac_adapter_info adapter_info; 956 struct aac_adapter_info adapter_info;
957 struct aac_supplement_adapter_info supplement_adapter_info;
892 /* These are in adapter info but they are in the io flow so 958 /* These are in adapter info but they are in the io flow so
893 * lets break them out so we don't have to do an AND to check them 959 * lets break them out so we don't have to do an AND to check them
894 */ 960 */
895 u8 nondasd_support; 961 u8 nondasd_support;
896 u8 dac_support; 962 u8 dac_support;
897 u8 raid_scsi_mode; 963 u8 raid_scsi_mode;
964 u8 printf_enabled;
898}; 965};
899 966
900#define aac_adapter_interrupt(dev) \ 967#define aac_adapter_interrupt(dev) \
@@ -903,6 +970,8 @@ struct aac_dev
903#define aac_adapter_notify(dev, event) \ 970#define aac_adapter_notify(dev, event) \
904 (dev)->a_ops.adapter_notify(dev, event) 971 (dev)->a_ops.adapter_notify(dev, event)
905 972
973#define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \
974 (dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)
906 975
907#define aac_adapter_check_health(dev) \ 976#define aac_adapter_check_health(dev) \
908 (dev)->a_ops.adapter_check_health(dev) 977 (dev)->a_ops.adapter_check_health(dev)
@@ -1016,83 +1085,102 @@ struct aac_dev
1016 1085
1017struct aac_read 1086struct aac_read
1018{ 1087{
1019 u32 command; 1088 __le32 command;
1020 u32 cid; 1089 __le32 cid;
1021 u32 block; 1090 __le32 block;
1022 u32 count; 1091 __le32 count;
1023 struct sgmap sg; // Must be last in struct because it is variable 1092 struct sgmap sg; // Must be last in struct because it is variable
1024}; 1093};
1025 1094
1026struct aac_read64 1095struct aac_read64
1027{ 1096{
1028 u32 command; 1097 __le32 command;
1029 u16 cid; 1098 __le16 cid;
1030 u16 sector_count; 1099 __le16 sector_count;
1031 u32 block; 1100 __le32 block;
1032 u16 pad; 1101 __le16 pad;
1033 u16 flags; 1102 __le16 flags;
1034 struct sgmap64 sg; // Must be last in struct because it is variable 1103 struct sgmap64 sg; // Must be last in struct because it is variable
1035}; 1104};
1036 1105
1037struct aac_read_reply 1106struct aac_read_reply
1038{ 1107{
1039 u32 status; 1108 __le32 status;
1040 u32 count; 1109 __le32 count;
1041}; 1110};
1042 1111
1043struct aac_write 1112struct aac_write
1044{ 1113{
1045 u32 command; 1114 __le32 command;
1046 u32 cid; 1115 __le32 cid;
1047 u32 block; 1116 __le32 block;
1048 u32 count; 1117 __le32 count;
1049 u32 stable; // Not used 1118 __le32 stable; // Not used
1050 struct sgmap sg; // Must be last in struct because it is variable 1119 struct sgmap sg; // Must be last in struct because it is variable
1051}; 1120};
1052 1121
1053struct aac_write64 1122struct aac_write64
1054{ 1123{
1055 u32 command; 1124 __le32 command;
1056 u16 cid; 1125 __le16 cid;
1057 u16 sector_count; 1126 __le16 sector_count;
1058 u32 block; 1127 __le32 block;
1059 u16 pad; 1128 __le16 pad;
1060 u16 flags; 1129 __le16 flags;
1061 struct sgmap64 sg; // Must be last in struct because it is variable 1130 struct sgmap64 sg; // Must be last in struct because it is variable
1062}; 1131};
1063struct aac_write_reply 1132struct aac_write_reply
1064{ 1133{
1065 u32 status; 1134 __le32 status;
1066 u32 count; 1135 __le32 count;
1067 u32 committed; 1136 __le32 committed;
1068}; 1137};
1069 1138
1070#define CT_FLUSH_CACHE 129 1139#define CT_FLUSH_CACHE 129
1071struct aac_synchronize { 1140struct aac_synchronize {
1072 u32 command; /* VM_ContainerConfig */ 1141 __le32 command; /* VM_ContainerConfig */
1073 u32 type; /* CT_FLUSH_CACHE */ 1142 __le32 type; /* CT_FLUSH_CACHE */
1074 u32 cid; 1143 __le32 cid;
1075 u32 parm1; 1144 __le32 parm1;
1076 u32 parm2; 1145 __le32 parm2;
1077 u32 parm3; 1146 __le32 parm3;
1078 u32 parm4; 1147 __le32 parm4;
1079 u32 count; /* sizeof(((struct aac_synchronize_reply *)NULL)->data) */ 1148 __le32 count; /* sizeof(((struct aac_synchronize_reply *)NULL)->data) */
1080}; 1149};
1081 1150
1082struct aac_synchronize_reply { 1151struct aac_synchronize_reply {
1083 u32 dummy0; 1152 __le32 dummy0;
1084 u32 dummy1; 1153 __le32 dummy1;
1085 u32 status; /* CT_OK */ 1154 __le32 status; /* CT_OK */
1086 u32 parm1; 1155 __le32 parm1;
1087 u32 parm2; 1156 __le32 parm2;
1088 u32 parm3; 1157 __le32 parm3;
1089 u32 parm4; 1158 __le32 parm4;
1090 u32 parm5; 1159 __le32 parm5;
1091 u8 data[16]; 1160 u8 data[16];
1092}; 1161};
1093 1162
1094struct aac_srb 1163struct aac_srb
1095{ 1164{
1165 __le32 function;
1166 __le32 channel;
1167 __le32 id;
1168 __le32 lun;
1169 __le32 timeout;
1170 __le32 flags;
1171 __le32 count; // Data xfer size
1172 __le32 retry_limit;
1173 __le32 cdb_size;
1174 u8 cdb[16];
1175 struct sgmap sg;
1176};
1177
1178/*
1179 * This and assocated data structs are used by the
1180 * ioctl caller and are in cpu order.
1181 */
1182struct user_aac_srb
1183{
1096 u32 function; 1184 u32 function;
1097 u32 channel; 1185 u32 channel;
1098 u32 id; 1186 u32 id;
@@ -1103,20 +1191,18 @@ struct aac_srb
1103 u32 retry_limit; 1191 u32 retry_limit;
1104 u32 cdb_size; 1192 u32 cdb_size;
1105 u8 cdb[16]; 1193 u8 cdb[16];
1106 struct sgmap sg; 1194 struct user_sgmap sg;
1107}; 1195};
1108 1196
1109
1110
1111#define AAC_SENSE_BUFFERSIZE 30 1197#define AAC_SENSE_BUFFERSIZE 30
1112 1198
1113struct aac_srb_reply 1199struct aac_srb_reply
1114{ 1200{
1115 u32 status; 1201 __le32 status;
1116 u32 srb_status; 1202 __le32 srb_status;
1117 u32 scsi_status; 1203 __le32 scsi_status;
1118 u32 data_xfer_length; 1204 __le32 data_xfer_length;
1119 u32 sense_data_size; 1205 __le32 sense_data_size;
1120 u8 sense_data[AAC_SENSE_BUFFERSIZE]; // Can this be SCSI_SENSE_BUFFERSIZE 1206 u8 sense_data[AAC_SENSE_BUFFERSIZE]; // Can this be SCSI_SENSE_BUFFERSIZE
1121}; 1207};
1122/* 1208/*
@@ -1223,14 +1309,14 @@ struct aac_srb_reply
1223 */ 1309 */
1224 1310
1225struct aac_fsinfo { 1311struct aac_fsinfo {
1226 u32 fsTotalSize; /* Consumed by fs, incl. metadata */ 1312 __le32 fsTotalSize; /* Consumed by fs, incl. metadata */
1227 u32 fsBlockSize; 1313 __le32 fsBlockSize;
1228 u32 fsFragSize; 1314 __le32 fsFragSize;
1229 u32 fsMaxExtendSize; 1315 __le32 fsMaxExtendSize;
1230 u32 fsSpaceUnits; 1316 __le32 fsSpaceUnits;
1231 u32 fsMaxNumFiles; 1317 __le32 fsMaxNumFiles;
1232 u32 fsNumFreeFiles; 1318 __le32 fsNumFreeFiles;
1233 u32 fsInodeDensity; 1319 __le32 fsInodeDensity;
1234}; /* valid iff ObjType == FT_FILESYS && !(ContentState & FSCS_NOTCLEAN) */ 1320}; /* valid iff ObjType == FT_FILESYS && !(ContentState & FSCS_NOTCLEAN) */
1235 1321
1236union aac_contentinfo { 1322union aac_contentinfo {
@@ -1243,32 +1329,32 @@ union aac_contentinfo {
1243 1329
1244#define CT_GET_CONFIG_STATUS 147 1330#define CT_GET_CONFIG_STATUS 147
1245struct aac_get_config_status { 1331struct aac_get_config_status {
1246 u32 command; /* VM_ContainerConfig */ 1332 __le32 command; /* VM_ContainerConfig */
1247 u32 type; /* CT_GET_CONFIG_STATUS */ 1333 __le32 type; /* CT_GET_CONFIG_STATUS */
1248 u32 parm1; 1334 __le32 parm1;
1249 u32 parm2; 1335 __le32 parm2;
1250 u32 parm3; 1336 __le32 parm3;
1251 u32 parm4; 1337 __le32 parm4;
1252 u32 parm5; 1338 __le32 parm5;
1253 u32 count; /* sizeof(((struct aac_get_config_status_resp *)NULL)->data) */ 1339 __le32 count; /* sizeof(((struct aac_get_config_status_resp *)NULL)->data) */
1254}; 1340};
1255 1341
1256#define CFACT_CONTINUE 0 1342#define CFACT_CONTINUE 0
1257#define CFACT_PAUSE 1 1343#define CFACT_PAUSE 1
1258#define CFACT_ABORT 2 1344#define CFACT_ABORT 2
1259struct aac_get_config_status_resp { 1345struct aac_get_config_status_resp {
1260 u32 response; /* ST_OK */ 1346 __le32 response; /* ST_OK */
1261 u32 dummy0; 1347 __le32 dummy0;
1262 u32 status; /* CT_OK */ 1348 __le32 status; /* CT_OK */
1263 u32 parm1; 1349 __le32 parm1;
1264 u32 parm2; 1350 __le32 parm2;
1265 u32 parm3; 1351 __le32 parm3;
1266 u32 parm4; 1352 __le32 parm4;
1267 u32 parm5; 1353 __le32 parm5;
1268 struct { 1354 struct {
1269 u32 action; /* CFACT_CONTINUE, CFACT_PAUSE or CFACT_ABORT */ 1355 __le32 action; /* CFACT_CONTINUE, CFACT_PAUSE or CFACT_ABORT */
1270 u16 flags; 1356 __le16 flags;
1271 s16 count; 1357 __le16 count;
1272 } data; 1358 } data;
1273}; 1359};
1274 1360
@@ -1279,26 +1365,26 @@ struct aac_get_config_status_resp {
1279#define CT_COMMIT_CONFIG 152 1365#define CT_COMMIT_CONFIG 152
1280 1366
1281struct aac_commit_config { 1367struct aac_commit_config {
1282 u32 command; /* VM_ContainerConfig */ 1368 __le32 command; /* VM_ContainerConfig */
1283 u32 type; /* CT_COMMIT_CONFIG */ 1369 __le32 type; /* CT_COMMIT_CONFIG */
1284}; 1370};
1285 1371
1286/* 1372/*
1287 * Query for Container Configuration Count 1373 * Query for Container Configuration Status
1288 */ 1374 */
1289 1375
1290#define CT_GET_CONTAINER_COUNT 4 1376#define CT_GET_CONTAINER_COUNT 4
1291struct aac_get_container_count { 1377struct aac_get_container_count {
1292 u32 command; /* VM_ContainerConfig */ 1378 __le32 command; /* VM_ContainerConfig */
1293 u32 type; /* CT_GET_CONTAINER_COUNT */ 1379 __le32 type; /* CT_GET_CONTAINER_COUNT */
1294}; 1380};
1295 1381
1296struct aac_get_container_count_resp { 1382struct aac_get_container_count_resp {
1297 u32 response; /* ST_OK */ 1383 __le32 response; /* ST_OK */
1298 u32 dummy0; 1384 __le32 dummy0;
1299 u32 MaxContainers; 1385 __le32 MaxContainers;
1300 u32 ContainerSwitchEntries; 1386 __le32 ContainerSwitchEntries;
1301 u32 MaxPartitions; 1387 __le32 MaxPartitions;
1302}; 1388};
1303 1389
1304 1390
@@ -1308,15 +1394,19 @@ struct aac_get_container_count_resp {
1308 */ 1394 */
1309 1395
1310struct aac_mntent { 1396struct aac_mntent {
1311 u32 oid; 1397 __le32 oid;
1312 u8 name[16]; // if applicable 1398 u8 name[16]; /* if applicable */
1313 struct creation_info create_info; // if applicable 1399 struct creation_info create_info; /* if applicable */
1314 u32 capacity; 1400 __le32 capacity;
1315 u32 vol; // substrate structure 1401 __le32 vol; /* substrate structure */
1316 u32 obj; // FT_FILESYS, FT_DATABASE, etc. 1402 __le32 obj; /* FT_FILESYS,
1317 u32 state; // unready for mounting, readonly, etc. 1403 FT_DATABASE, etc. */
1318 union aac_contentinfo fileinfo; // Info specific to content manager (eg, filesystem) 1404 __le32 state; /* unready for mounting,
1319 u32 altoid; // != oid <==> snapshot or broken mirror exists 1405 readonly, etc. */
1406 union aac_contentinfo fileinfo; /* Info specific to content
1407 manager (eg, filesystem) */
1408 __le32 altoid; /* != oid <==> snapshot or
1409 broken mirror exists */
1320}; 1410};
1321 1411
1322#define FSCS_NOTCLEAN 0x0001 /* fsck is neccessary before mounting */ 1412#define FSCS_NOTCLEAN 0x0001 /* fsck is neccessary before mounting */
@@ -1324,40 +1414,40 @@ struct aac_mntent {
1324#define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */ 1414#define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */
1325 1415
1326struct aac_query_mount { 1416struct aac_query_mount {
1327 u32 command; 1417 __le32 command;
1328 u32 type; 1418 __le32 type;
1329 u32 count; 1419 __le32 count;
1330}; 1420};
1331 1421
1332struct aac_mount { 1422struct aac_mount {
1333 u32 status; 1423 __le32 status;
1334 u32 type; /* should be same as that requested */ 1424 __le32 type; /* should be same as that requested */
1335 u32 count; 1425 __le32 count;
1336 struct aac_mntent mnt[1]; 1426 struct aac_mntent mnt[1];
1337}; 1427};
1338 1428
1339#define CT_READ_NAME 130 1429#define CT_READ_NAME 130
1340struct aac_get_name { 1430struct aac_get_name {
1341 u32 command; /* VM_ContainerConfig */ 1431 __le32 command; /* VM_ContainerConfig */
1342 u32 type; /* CT_READ_NAME */ 1432 __le32 type; /* CT_READ_NAME */
1343 u32 cid; 1433 __le32 cid;
1344 u32 parm1; 1434 __le32 parm1;
1345 u32 parm2; 1435 __le32 parm2;
1346 u32 parm3; 1436 __le32 parm3;
1347 u32 parm4; 1437 __le32 parm4;
1348 u32 count; /* sizeof(((struct aac_get_name_resp *)NULL)->data) */ 1438 __le32 count; /* sizeof(((struct aac_get_name_resp *)NULL)->data) */
1349}; 1439};
1350 1440
1351#define CT_OK 218 1441#define CT_OK 218
1352struct aac_get_name_resp { 1442struct aac_get_name_resp {
1353 u32 dummy0; 1443 __le32 dummy0;
1354 u32 dummy1; 1444 __le32 dummy1;
1355 u32 status; /* CT_OK */ 1445 __le32 status; /* CT_OK */
1356 u32 parm1; 1446 __le32 parm1;
1357 u32 parm2; 1447 __le32 parm2;
1358 u32 parm3; 1448 __le32 parm3;
1359 u32 parm4; 1449 __le32 parm4;
1360 u32 parm5; 1450 __le32 parm5;
1361 u8 data[16]; 1451 u8 data[16];
1362}; 1452};
1363 1453
@@ -1366,8 +1456,8 @@ struct aac_get_name_resp {
1366 */ 1456 */
1367 1457
1368struct aac_close { 1458struct aac_close {
1369 u32 command; 1459 __le32 command;
1370 u32 cid; 1460 __le32 cid;
1371}; 1461};
1372 1462
1373struct aac_query_disk 1463struct aac_query_disk
@@ -1434,6 +1524,7 @@ struct revision
1434#define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED) 1524#define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED)
1435#define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER) 1525#define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER)
1436#define FSACTL_GET_CONTAINERS 2131 1526#define FSACTL_GET_CONTAINERS 2131
1527#define FSACTL_SEND_LARGE_FIB CTL_CODE(2138, METHOD_BUFFERED)
1437 1528
1438 1529
1439struct aac_common 1530struct aac_common
@@ -1573,8 +1664,8 @@ extern struct aac_common aac_config;
1573 */ 1664 */
1574 1665
1575struct aac_aifcmd { 1666struct aac_aifcmd {
1576 u32 command; /* Tell host what type of notify this is */ 1667 __le32 command; /* Tell host what type of notify this is */
1577 u32 seqnum; /* To allow ordering of reports (if necessary) */ 1668 __le32 seqnum; /* To allow ordering of reports (if necessary) */
1578 u8 data[1]; /* Undefined length (from kernel viewpoint) */ 1669 u8 data[1]; /* Undefined length (from kernel viewpoint) */
1579}; 1670};
1580 1671
@@ -1597,7 +1688,6 @@ int fib_setup(struct aac_dev *dev);
1597void fib_map_free(struct aac_dev *dev); 1688void fib_map_free(struct aac_dev *dev);
1598void fib_free(struct fib * context); 1689void fib_free(struct fib * context);
1599void fib_init(struct fib * context); 1690void fib_init(struct fib * context);
1600void fib_dealloc(struct fib * context);
1601void aac_printf(struct aac_dev *dev, u32 val); 1691void aac_printf(struct aac_dev *dev, u32 val);
1602int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt); 1692int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt);
1603int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry); 1693int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry);
@@ -1621,3 +1711,5 @@ int fib_adapter_complete(struct fib * fibptr, unsigned short size);
1621struct aac_driver_ident* aac_get_driver_ident(int devtype); 1711struct aac_driver_ident* aac_get_driver_ident(int devtype);
1622int aac_get_adapter_info(struct aac_dev* dev); 1712int aac_get_adapter_info(struct aac_dev* dev);
1623int aac_send_shutdown(struct aac_dev *dev); 1713int aac_send_shutdown(struct aac_dev *dev);
1714extern int numacb;
1715extern int acbsize;