kernel: Replace the remaining __amd64__ with __x86_64__ for consistency.
[dragonfly.git] / sys / dev / raid / asr / osd_unix.h
1 /*-
2  * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
3  * All rights reserved.
4  *
5  * Redistribution and use in source form, with or without modification, are
6  * permitted provided that redistributions of source code must retain the
7  * above copyright notice, this list of conditions and the following disclaimer.
8  *
9  * This software is provided `as is' by Distributed Processing Technology and
10  * any express or implied warranties, including, but not limited to, the
11  * implied warranties of merchantability and fitness for a particular purpose,
12  * are disclaimed. In no event shall Distributed Processing Technology be
13  * liable for any direct, indirect, incidental, special, exemplary or
14  * consequential damages (including, but not limited to, procurement of
15  * substitute goods or services; loss of use, data, or profits; or business
16  * interruptions) however caused and on any theory of liability, whether in
17  * contract, strict liability, or tort (including negligence or otherwise)
18  * arising in any way out of the use of this driver software, even if advised
19  * of the possibility of such damage.
20  *
21  * $FreeBSD: src/sys/dev/asr/osd_unix.h,v 1.9 2005/01/06 01:42:29 imp Exp $
22  */
23
24 #ifndef         __OSD_UNIX_H
25 #define         __OSD_UNIX_H
26
27 #include <sys/ioccom.h>
28
29 /*File - OSD_UNIX.H */
30 /*****************************************************************************/
31 /*                                                                           */
32 /*Description:                                                               */
33 /*                                                                           */
34 /*    This file contains definitions for the UNIX OS dependent layer of the  */
35 /*DPT engine.                                                                */
36 /*                                                                           */
37 /*Copyright Distributed Processing Technology, Corp.                         */
38 /*        140 Candace Dr.                                                    */
39 /*        Maitland, Fl. 32751   USA                                          */
40 /*        Phone: (407) 830-5522  Fax: (407) 260-5366                         */
41 /*        All Rights Reserved                                                */
42 /*                                                                           */
43 /*Author:       Bob Pasteur                                                  */
44 /*Date:         5/28/93                                                      */
45 /*                                                                           */
46 /*Editors:                                                                   */
47 /*              3/7/96  salyzyn@dpt.com                                      */
48 /*                      Added BSDi extensions                                */
49 /*              30/9/99 salyzyn@dpt.com                                      */
50 /*                      Added I2ORESCANCMD                                   */
51 /*              7/12/99 salyzyn@dpt.com                                      */
52 /*                      Added I2ORESETCMD                                    */
53 /*                                                                           */
54 /*Remarks:                                                                   */
55 /*                                                                           */
56 /*                                                                           */
57 /*****************************************************************************/
58
59 /* Definitions - Defines & Constants ---------------------------------------*/
60
61 #define DPT_TurnAroundKey  0x01    /* TurnAround Message Type for engine      */
62 #define DPT_EngineKey      0x02    /* Message Que and Type for engine         */
63 #define DPT_LoggerKey      0x03    /* Message Type For Logger                 */
64 #define DPT_CommEngineKey  0x04    /* Message Que Type Created                */
65
66 #define MSG_RECEIVE    0x40000000  /* Ored Into Logger PID For Return Msg     */
67
68 #define ENGMSG_ECHO        0x00    /* Turnarround Echo Engine Message         */
69 #define ENGMSG_OPEN        0x01    /* Turnarround Open Engine Message         */
70 #define ENGMSG_CLOSE       0x02    /* Turnarround Close Engine Message        */
71
72   /* Message Que Creation Flags */
73
74 #define MSG_URD            00400
75 #define MSG_UWR            00200
76 #define MSG_GRD            00040
77 #define MSG_GWR            00020
78 #define MSG_ORD            00004
79 #define MSG_OWR            00002
80 #define MSG_ALLRD          00444
81 #define MSG_ALLWR          00222
82
83   /* Message Que Creation Flags */
84
85 #define SHM_URD            00400
86 #define SHM_UWR            00200
87 #define SHM_GRD            00040
88 #define SHM_GWR            00020
89 #define SHM_ORD            00004
90 #define SHM_OWR            00002
91 #define SHM_ALLRD          00444
92 #define SHM_ALLWR          00222
93
94   /* Program Exit Codes */
95
96 #define ExitGoodStatus           0
97 #define ExitBadParameter         1
98 #define ExitSignalFail           3
99 #define ExitMsqAllocFail         5
100 #define ExitBuffAllocFail        6
101 #define ExitMsgSendFail          8
102 #define ExitMsgReceiveFail       9
103
104 #define ExitEngOpenFail          10
105 #define ExitDuplicateEngine      11
106
107 #define ExitCommAllocFail        12
108 #define ExitDuplicateCommEng     13
109 #define ExitCommConnectFail      14
110
111 #ifndef MAX_HAS
112
113 #define MAX_HAS                  18
114 #define MAX_NAME                 100
115
116 #endif  /* ifndef MAX_HAS */
117
118
119 typedef struct {
120         uCHAR ConfigLength[4];       /* Len in bytes after this field.      */
121         uCHAR EATAsignature[4];
122         uCHAR EATAversion;
123         uCHAR Flags1;
124         uCHAR PadLength[2];
125         uCHAR HBA[4];
126         uCHAR CPlength[4];           /* Command Packet Length               */
127         uCHAR SPlength[4];           /* Status Packet Length                */
128         uCHAR QueueSize[2];          /* Controller Que depth                */
129         uCHAR SG_Size[4];
130         uCHAR Flags2;
131         uCHAR Reserved0;             /* Reserved Field                       */
132         uCHAR Flags3;
133         uCHAR ScsiValues;
134         uCHAR MaxLUN;                /* Maximun LUN Supported                */
135         uCHAR Flags4;
136         uCHAR RaidNum;               /* RAID HBA Number For Stripping        */
137         uCHAR Reserved3;             /* Reserved Field                       */
138                } DptReadConfig_t;
139
140 #if defined(_DPT_SOLARIS)
141
142 #include <sys/types.h>
143 #include <sys/ddidmareq.h>
144 #include <sys/mutex.h>
145 #include <sys/scsi/scsi.h>
146 /*#define       _KERNEL */
147 #include <sys/dditypes.h>
148 #include <sys/ddi_impldefs.h>
149 #include <sys/scsi/impl/transport.h>
150 /* #undef _KERNEL */
151
152 #undef MSG_DISCONNECT
153 #define MSG_DISCONNECT  0x11L
154
155 #define EATAUSRCMD     1
156 #define DPT_SIGNATURE  2
157 #define DPT_NUMCTRLS   3
158 #define DPT_CTRLINFO   4
159 #define DPT_SYSINFO    5
160 #define DPT_BLINKLED   6
161 #define I2OUSRCMD      7
162 /* #define      I2ORESCANCMD 8 */       /* Use DPT_IO_ACCESS instead */
163 /* #define      I2ORESETCMD  9 */       /* Use DPT_IO_ACCESS instead */
164
165 #define DPT_MAX_DMA_SEGS  32         /* Max used Scatter/Gather seg         */
166
167 struct dpt_sg {
168        paddr_t data_addr;
169        uLONG data_len;
170               };
171
172 typedef struct {
173         uSHORT NumHBAs;
174         uLONG IOAddrs[18];
175                } GetHbaInfo_t;
176
177 #elif defined(_DPT_DGUX)
178
179 #ifndef _IOWR
180 # define _IOWR(x,y,z)   (0x0fff3900|y)
181 #endif
182 #ifndef _IOW
183 # define _IOW(x,y,z)    (0x0fff3900|y)
184 #endif
185 #ifndef _IOR
186 # define _IOR(x,y,z)    (0x0fff3900|y)
187 #endif
188 #ifndef _IO
189 # define _IO(x,y)       (0x0fff3900|y)
190 #endif
191 /* EATA PassThrough Command     */
192 #define EATAUSRCMD      _IOWR('D',65,EATA_CP)
193 /* Get Signature Structure      */
194 #define DPT_SIGNATURE   _IOR('D',67,dpt_sig_S)
195 /* Get Number Of DPT Adapters   */
196 #define DPT_NUMCTRLS    _IOR('D',68,int)
197 /* Get Adapter Info Structure   */
198 #define DPT_CTRLINFO    _IOR('D',69,CtrlInfo)
199 /* Get System Info Structure    */
200 #define DPT_SYSINFO     _IOR('D',72,sysInfo_S)
201 /* Get Blink LED Code           */
202 #define DPT_BLINKLED    _IOR('D',75,int)
203 /* Get Statistical information (if available) */
204 #define DPT_STATS_INFO        _IOR('D',80,STATS_DATA)
205 /* Clear the statistical information          */
206 #define DPT_STATS_CLEAR       _IO('D',81)
207 /* Send an I2O command */
208 #define I2OUSRCMD       _IO('D',76)
209 /* Inform driver to re-acquire LCT information */
210 #define I2ORESCANCMD    _IO('D',77)
211 /* Inform driver to reset adapter */
212 #define I2ORESETCMD     _IO('D',78)
213
214 #elif defined(SNI_MIPS)
215   /* Unix Ioctl Command definitions */
216
217 #define EATAUSRCMD     (('D'<<8)|65)
218 #define DPT_DEBUG      (('D'<<8)|66)
219 #define DPT_SIGNATURE  (('D'<<8)|67)
220 #define DPT_NUMCTRLS   (('D'<<8)|68)
221 #define DPT_CTRLINFO   (('D'<<8)|69)
222 #define DPT_STATINFO   (('D'<<8)|70)
223 #define DPT_CLRSTAT    (('D'<<8)|71)
224 #define DPT_SYSINFO    (('D'<<8)|72)
225 /* Set Timeout Value            */
226 #define DPT_TIMEOUT    (('D'<<8)|73)
227 /* Get config Data              */
228 #define DPT_CONFIG     (('D'<<8)|74)
229 /* Get config Data              */
230 #define DPT_BLINKLED   (('D'<<8)|75)
231 /* Get Statistical information (if available) */
232 #define DPT_STATS_INFO        (('D'<<8)|80)
233 /* Clear the statistical information          */
234 #define DPT_STATS_CLEAR       (('D'<<8)|81)
235 /* Send an I2O command */
236 #define I2OUSRCMD       (('D'<<8)|76)
237 /* Inform driver to re-acquire LCT information */
238 #define I2ORESCANCMD    (('D'<<8)|77)
239 /* Inform driver to reset adapter */
240 #define I2ORESETCMD     (('D'<<8)|78)
241
242 #else
243
244   /* Unix Ioctl Command definitions */
245
246 #ifdef _DPT_AIX
247
248 #undef _IOWR
249 #undef _IOW
250 #undef _IOR
251 #undef _IO
252 #endif
253
254 #ifndef _IOWR
255 # define _IOWR(x,y,z)   (((x)<<8)|y)
256 #endif
257 #ifndef _IOW
258 # define _IOW(x,y,z)    (((x)<<8)|y)
259 #endif
260 #ifndef _IOR
261 # define _IOR(x,y,z)    (((x)<<8)|y)
262 #endif
263 #ifndef _IO
264 # define _IO(x,y)       (((x)<<8)|y)
265 #endif
266 /* EATA PassThrough Command     */
267 #define EATAUSRCMD      _IOWR('D',65,EATA_CP)
268 /* Set Debug Level If Enabled   */
269 #define DPT_DEBUG       _IOW('D',66,int)
270 /* Get Signature Structure      */
271 #define DPT_SIGNATURE   _IOR('D',67,dpt_sig_S)
272 #if defined __bsdi__
273 #define DPT_SIGNATURE_PACKED   _IOR('D',67,dpt_sig_S_Packed)
274 #endif
275 /* Get Number Of DPT Adapters   */
276 #define DPT_NUMCTRLS    _IOR('D',68,int)
277 /* Get Adapter Info Structure   */
278 #define DPT_CTRLINFO    _IOR('D',69,CtrlInfo)
279 /* Get Statistics If Enabled    */
280 #define DPT_STATINFO    _IO('D',70)
281 /* Clear Stats If Enabled       */
282 #define DPT_CLRSTAT     _IO('D',71)
283 /* Get System Info Structure    */
284 #define DPT_SYSINFO     _IOR('D',72,sysInfo_S)
285 /* Set Timeout Value            */
286 #define DPT_TIMEOUT     _IO('D',73)
287 /* Get config Data              */
288 #define DPT_CONFIG      _IO('D',74)
289 /* Get Blink LED Code           */
290 #define DPT_BLINKLED    _IOR('D',75,int)
291 /* Get Statistical information (if available) */
292 #define DPT_STATS_INFO        _IOR('D',80,STATS_DATA)
293 /* Clear the statistical information          */
294 #define DPT_STATS_CLEAR       _IO('D',81)
295 /* Get Performance metrics */
296 #define DPT_PERF_INFO        _IOR('D',82,dpt_perf_t)
297 /* Send an I2O command */
298 #define I2OUSRCMD       _IO('D',76)
299 /* Inform driver to re-acquire LCT information */
300 #define I2ORESCANCMD    _IO('D',77)
301 /* Inform driver to reset adapter */
302 #define I2ORESETCMD     _IO('D',78)
303 #if defined _DPT_LINUX
304 /* See if the target is mounted */
305 #define DPT_TARGET_BUSY _IOR('D',79, TARGET_BUSY_T)
306 #endif
307
308
309 #endif  /* _DPT_SOLARIS else */
310
311                  /* Adapter Flags Field Bit Definitions */
312
313 #define CTLR_INSTALLED  0x00000001  /* Adapter Was Installed        */
314 #define CTLR_DMA        0x00000002  /* DMA Supported                */
315 #define CTLR_OVERLAP    0x00000004  /* Overlapped Commands Support  */
316 #define CTLR_SECONDARY  0x00000008  /* I/O Address Not 0x1f0        */
317 #define CTLR_BLINKLED   0x00000010  /* Adapter In Blink LED State   */
318 #define CTLR_HBACI      0x00000020  /* Cache Inhibit Supported      */
319 #define CTLR_CACHE      0x00000040  /* Adapter Has Cache            */
320 #define CTLR_SANE       0x00000080  /* Adapter Functioning OK       */
321 #define CTLR_BUS_QUIET  0x00000100  /* Bus Quite On This Adapter    */
322 #define CTLR_ABOVE_16   0x00000200  /* Support For Mem. Above 16 MB */
323 #define CTLR_SCAT_GATH  0x00000400  /* Scatter Gather Supported     */
324
325
326 /* Definitions - Structure & Typedef ---------------------------------------*/
327
328 typedef struct {
329                  uLONG     MsgID;
330                  DPT_TAG_T engineTag;
331                  DPT_TAG_T targetTag;
332                  DPT_MSG_T engEvent;
333                  long      BufferID;
334                  uLONG     FromEngBuffOffset;
335                  uLONG     callerID;
336                  DPT_RTN_T result;
337                  uLONG     timeOut;
338                } MsgHdr;
339
340 #define MsgDataSize sizeof(MsgHdr) - 4
341
342 #ifndef SNI_MIPS
343
344 /*-------------------------------------------------------------------------*/
345 /*                     EATA Command Packet definition                      */
346 /*-------------------------------------------------------------------------*/
347
348 typedef struct EATACommandPacket {
349
350 #ifdef _DPT_UNIXWARE
351
352         uCHAR     EataID[4];
353         uINT      EataCmd;
354         uCHAR     *CmdBuffer;
355
356 #endif   /* _DPT_UNIXWARE */
357
358 #ifdef _DPT_AIX
359
360         uCHAR     HbaTargetID;
361         uCHAR     HbaLUN;
362
363 #endif  /* _DPT_AIX */
364
365         uCHAR    cp_Flags1;          /* Command Flags                       */
366         uCHAR    cp_Req_Len;         /* AutoRequestSense Data length.       */
367         uCHAR    cp_Resv1[3];        /* Reserved Fields                     */
368         uCHAR    cp_Flags2;
369         uCHAR    cp_Flags3;
370         uCHAR    cp_ScsiAddr;
371         uCHAR    cp_msg0;            /* Identify and Disconnect Message.    */
372         uCHAR    cp_msg1;
373         uCHAR    cp_msg2;
374         uCHAR    cp_msg3;
375         uCHAR    cp_cdb[12];         /* SCSI cdb for command.               */
376         uLONG    cp_dataLen;         /* Data length in Bytes for command.   */
377         uLONG    cp_Vue;             /* Vendor Unique Area                  */
378         uCHAR    *cp_DataAddr;       /* Data Address For The Command.       */
379         uCHAR    *cp_SpAddr;         /* Status Packet Physical Address.     */
380         uCHAR    *cp_SenseAddr;      /* AutoRequestSense Data Phy Address.  */
381
382 #ifdef _DPT_SOLARIS
383
384         uCHAR     HostStatus;
385         uCHAR     TargetStatus;
386         uCHAR     CdbLength;
387         uCHAR     SG_Size;
388         struct scsi_arq_status ReqSenseData;
389         struct  dpt_sg SG_List[DPT_MAX_DMA_SEGS];
390         union {
391                 char *b_scratch;
392                 struct scsi_cmd *b_ownerp;
393               } cc;
394         paddr_t ccb_paddr;
395         uSHORT IOAddress;
396
397 #else  /* _DPT_SOLARIS */
398
399         uLONG     TimeOut ;
400         uCHAR     HostStatus;
401         uCHAR     TargetStatus;
402         uCHAR     Retries;
403
404 #endif  /* _DPT_SOLARIS else */
405
406                                   } EATA_CP;
407 #endif /* SNI_MIPS */
408
409
410                       /* Control Flags 1 Definitions */
411
412 #define SCSI_RESET        0x01       /* Cause a SCSI Bus reset on the cmd */
413 #define HBA_INIT          0x02       /* Cause Controller to reInitialize  */
414 #define AUTO_REQ_SENSE    0x04       /* Do Auto Request Sense on errors   */
415 #define SCATTER_GATHER    0x08       /* Data Ptr points to a SG Packet    */
416 #define INTERPRET         0x20       /* Interpret the SCSI cdb of own use */
417 #define DATA_OUT          0x04       /* Data Out phase with command       */
418 #define DATA_IN           0x08       /* Data In phase with command        */
419
420                       /* Control Flags 2 Definitions */
421
422 #define FIRMWARE_NESTED   0x01
423
424
425                       /* Control Flags 3 Definitions */
426
427 #define PHYSICAL_UNIT     0x01       /* Send Command Directly To Target   */
428 #define IAT               0x02       /* Inhibit Address Translation       */
429 #define HBACI             0x04       /* Inhibit Caching                   */
430
431
432   /* Structure Returned From Get Controller Info                             */
433
434 typedef struct {
435
436         uCHAR    state;            /* Operational state               */
437         uCHAR    id;               /* Host adapter SCSI id            */
438         int      vect;             /* Interrupt vector number         */
439         int      base;             /* Base I/O address                */
440         int      njobs;            /* # of jobs sent to HA            */
441         int      qdepth;           /* Controller queue depth.         */
442         int      wakebase;         /* mpx wakeup base index.          */
443         uLONG    SGsize;           /* Scatter/Gather list size.       */
444         unsigned heads;            /* heads for drives on cntlr.      */
445         unsigned sectors;          /* sectors for drives on cntlr.    */
446         uCHAR    do_drive32;       /* Flag for Above 16 MB Ability    */
447         uCHAR    BusQuiet;         /* SCSI Bus Quiet Flag             */
448         char     idPAL[4];         /* 4 Bytes Of The ID Pal           */
449         uCHAR    primary;          /* 1 For Primary, 0 For Secondary  */
450         uCHAR    eataVersion;      /* EATA Version                    */
451         uLONG    cpLength;         /* EATA Command Packet Length      */
452         uLONG    spLength;         /* EATA Status Packet Length       */
453         uCHAR    drqNum;           /* DRQ Index (0,5,6,7)             */
454         uCHAR    flag1;            /* EATA Flags 1 (Byte 9)           */
455         uCHAR    flag2;            /* EATA Flags 2 (Byte 30)          */
456
457                } CtrlInfo;
458
459 #ifndef SNI_MIPS
460 #ifdef _DPT_UNIXWARE
461
462 typedef struct {
463
464         uINT     state;            /* Operational state            */
465         uCHAR    id[4];            /* Host adapter SCSI id         */
466         uINT     vect;             /* Interrupt vector number      */
467         uLONG    base;             /* Base I/O address             */
468         int      ha_max_jobs;      /* Max number of Active Jobs    */
469         uLONG    ha_cacheParams;
470         int      ha_nbus;          /* Number Of Busses on HBA      */
471         int      ha_ntargets;      /* Number Of Targets Supported  */
472         int      ha_nluns;         /* Number Of LUNs Supported     */
473         int      ha_tshift;        /* Shift value for target       */
474         int      ha_bshift;        /* Shift value for bus          */
475         uINT     ha_npend;         /* # of jobs sent to HA         */
476         int      ha_active_jobs;   /* Number Of Active Jobs        */
477
478                } HbaInfo;
479
480         /* SDI ioctl prefix for hba specific ioctl's */
481
482 #define SDI_IOC        (('S'<<24)|('D'<<16)|('I'<<8))
483
484 #define SDI_HBANAME    ((SDI_IOC)|0x14) /* Get HBA module name      */
485 #define SDI_SEND       0x0081           /* Send a SCSI command      */
486
487 #else
488
489 typedef struct {
490
491         uLONG  flags;            /* Operational State Flags         */
492         uCHAR  id[4];            /* Host Adapter SCSI ID            */
493         int    vect;             /* Interrupt Vector Number         */
494         int    base;             /* Base I/O Address                */
495         int    njobs;            /* # Of CCBs Outstanding To HBA    */
496         int    qdepth;           /* Controller Queue depth.         */
497         uLONG  SGsize;           /* Scatter/Gather List Size.       */
498         char   idPAL[4];         /* 4 Bytes Of The ID Pal           */
499         uCHAR  eataVersion;      /* EATA Version                    */
500         uLONG  cpLength;         /* EATA Command Packet Length      */
501         uLONG  spLength;         /* EATA Status Packet Length       */
502         uCHAR  drqNum;           /* DRQ Index (0,5,6,7)             */
503         uCHAR  eataflag1;        /* EATA Flags 1 (Byte 9)           */
504         uCHAR  eataflag2;        /* EATA Flags 2 (Byte 30)          */
505         uCHAR  maxChannel;       /* Maximum Channel Number          */
506         uCHAR  maxID;            /* Maximum Target ID               */
507         uCHAR  maxLUN;           /* Maximum LUN                     */
508         uCHAR  HbaBusType;       /* HBA Bus Type, EISA, PCI, etc    */
509         uCHAR  RaidNum;          /* Host Adapter RAID Number        */
510
511                } HbaInfo;
512
513 #endif  /* _DPT_UNIXWARE */
514 #endif /* SNI_MIPS */
515
516
517 #ifdef _DPT_AIX
518
519 /*
520  * DPT Host Adapter config information structure - this structure contains
521  * configuration information about an adapter.  It is imbedded into the
522  * dpt_ctl structure.
523  */
524
525 typedef struct dpt_cfg {
526     uchar       flags;                  /* Operational state flags      */
527     uchar       id[4];                  /* Host adapter SCSI IDs        */
528     int         vect;                   /* Interrupt vector number      */
529     ulong       base_addr;              /* Base I/O address             */
530     int         qdepth;                 /* Controller queue depth.      */
531     ulong       SGsize;                 /* Max scatter/gather list sz   */
532     ulong       SGmax;                  /* Max s/g we can use per req   */
533     uchar       eataVersion;            /* EATA version                 */
534     ushort      cpPadLen;               /* # of pad bytes sent to HA for
535                                            PIO commands                 */
536     ulong       cpLength;               /* EATA Command Packet length   */
537     ulong       spLength;               /* EATA Status Packet length    */
538     uchar       eataflag1;              /* EATA Flags 1 (Byte 9)        */
539     uchar       eataflag2;              /* EATA Flags 2 (Byte 30)       */
540     uchar       maxChan;                /* Maximum Channel number       */
541     uchar       maxID;                  /* Maximum target ID            */
542     uchar       maxLUN;                 /* Maximum LUN                  */
543     uchar       HbaBusType;             /* HBA bus type, EISA, PCI, etc */
544     uchar       RaidNum;                /* Host adapter RAID number     */
545 } DptCfg_t;
546
547 #endif /* _DPT_AIX */
548
549
550 #define MAX_ELEMENT_COUNT        64
551 #define MAX_BUCKET_COUNT         10
552
553 /*
554  * DPT statistics structure definitions
555  */
556 typedef struct IO_SIZE_STATS
557 {
558   uLONG TotalIoCount;
559   uLONG IoCountRead;
560   uLONG IoCountReadSg;
561   uLONG IoCountWrite;
562   uLONG IoCountWriteSg;
563   uLONG UnalignedIoAddress;
564   uLONG SgElementCount[MAX_ELEMENT_COUNT];
565
566 } IO_SIZE_STATS_T, *pIO_SIZE_STATS_T;
567
568 typedef struct STATS_DATA
569 {
570   uLONG TotalIoCount;
571   uLONG TotalUnCachedIoCount;
572   uLONG MaxOutstandingIoCount;
573   uLONG CurrentOutstandingIoCount;
574   uLONG OutstandingIoRunningCount;
575   uLONG UnalignedPktCount;
576   uLONG UnalignedSgCount;
577   uLONG NonPageListAddressSgCount;
578   uLONG MaxMessagesPerInterrupt;
579   IO_SIZE_STATS_T IoSize[MAX_BUCKET_COUNT];
580
581 } STATS_DATA_T, *pSTATS_DATA_T;
582
583 typedef struct TARGET_BUSY
584 {
585   uLONG channel;
586   uLONG id;
587   uLONG lun;
588   uLONG isBusy;
589 } TARGET_BUSY_T;
590 #endif /* __OSD_UNIX_H */