spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / drivers / scsi / dpt / dpti_ioctl.h
blobf60236721e0ddef2074fdd3b08538a3ba1acc67f
1 /***************************************************************************
2 dpti_ioctl.h - description
3 -------------------
4 begin : Thu Sep 7 2000
5 copyright : (C) 2001 by Adaptec
7 See Documentation/scsi/dpti.txt for history, notes, license info
8 and credits
9 ***************************************************************************/
11 /***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
20 /***************************************************************************
21 * This file is generated from osd_unix.h *
22 * *************************************************************************/
24 #ifndef _dpti_ioctl_h
25 #define _dpti_ioctl_h
27 // IOCTL interface commands
29 #ifndef _IOWR
30 # define _IOWR(x,y,z) (((x)<<8)|y)
31 #endif
32 #ifndef _IOW
33 # define _IOW(x,y,z) (((x)<<8)|y)
34 #endif
35 #ifndef _IOR
36 # define _IOR(x,y,z) (((x)<<8)|y)
37 #endif
38 #ifndef _IO
39 # define _IO(x,y) (((x)<<8)|y)
40 #endif
41 /* EATA PassThrough Command */
42 #define EATAUSRCMD _IOWR('D',65,EATA_CP)
43 /* Set Debug Level If Enabled */
44 #define DPT_DEBUG _IOW('D',66,int)
45 /* Get Signature Structure */
46 #define DPT_SIGNATURE _IOR('D',67,dpt_sig_S)
47 #if defined __bsdi__
48 #define DPT_SIGNATURE_PACKED _IOR('D',67,dpt_sig_S_Packed)
49 #endif
50 /* Get Number Of DPT Adapters */
51 #define DPT_NUMCTRLS _IOR('D',68,int)
52 /* Get Adapter Info Structure */
53 #define DPT_CTRLINFO _IOR('D',69,CtrlInfo)
54 /* Get Statistics If Enabled */
55 #define DPT_STATINFO _IO('D',70)
56 /* Clear Stats If Enabled */
57 #define DPT_CLRSTAT _IO('D',71)
58 /* Get System Info Structure */
59 #define DPT_SYSINFO _IOR('D',72,sysInfo_S)
60 /* Set Timeout Value */
61 #define DPT_TIMEOUT _IO('D',73)
62 /* Get config Data */
63 #define DPT_CONFIG _IO('D',74)
64 /* Get Blink LED Code */
65 #define DPT_BLINKLED _IOR('D',75,int)
66 /* Get Statistical information (if available) */
67 #define DPT_STATS_INFO _IOR('D',80,STATS_DATA)
68 /* Clear the statistical information */
69 #define DPT_STATS_CLEAR _IO('D',81)
70 /* Get Performance metrics */
71 #define DPT_PERF_INFO _IOR('D',82,dpt_perf_t)
72 /* Send an I2O command */
73 #define I2OUSRCMD _IO('D',76)
74 /* Inform driver to re-acquire LCT information */
75 #define I2ORESCANCMD _IO('D',77)
76 /* Inform driver to reset adapter */
77 #define I2ORESETCMD _IO('D',78)
78 /* See if the target is mounted */
79 #define DPT_TARGET_BUSY _IOR('D',79, TARGET_BUSY_T)
82 /* Structure Returned From Get Controller Info */
84 typedef struct {
85 uCHAR state; /* Operational state */
86 uCHAR id; /* Host adapter SCSI id */
87 int vect; /* Interrupt vector number */
88 int base; /* Base I/O address */
89 int njobs; /* # of jobs sent to HA */
90 int qdepth; /* Controller queue depth. */
91 int wakebase; /* mpx wakeup base index. */
92 uINT SGsize; /* Scatter/Gather list size. */
93 unsigned heads; /* heads for drives on cntlr. */
94 unsigned sectors; /* sectors for drives on cntlr. */
95 uCHAR do_drive32; /* Flag for Above 16 MB Ability */
96 uCHAR BusQuiet; /* SCSI Bus Quiet Flag */
97 char idPAL[4]; /* 4 Bytes Of The ID Pal */
98 uCHAR primary; /* 1 For Primary, 0 For Secondary */
99 uCHAR eataVersion; /* EATA Version */
100 uINT cpLength; /* EATA Command Packet Length */
101 uINT spLength; /* EATA Status Packet Length */
102 uCHAR drqNum; /* DRQ Index (0,5,6,7) */
103 uCHAR flag1; /* EATA Flags 1 (Byte 9) */
104 uCHAR flag2; /* EATA Flags 2 (Byte 30) */
105 } CtrlInfo;
107 typedef struct {
108 uSHORT length; // Remaining length of this
109 uSHORT drvrHBAnum; // Relative HBA # used by the driver
110 uINT baseAddr; // Base I/O address
111 uSHORT blinkState; // Blink LED state (0=Not in blink LED)
112 uCHAR pciBusNum; // PCI Bus # (Optional)
113 uCHAR pciDeviceNum; // PCI Device # (Optional)
114 uSHORT hbaFlags; // Miscellaneous HBA flags
115 uSHORT Interrupt; // Interrupt set for this device.
116 # if (defined(_DPT_ARC))
117 uINT baseLength;
118 ADAPTER_OBJECT *AdapterObject;
119 LARGE_INTEGER DmaLogicalAddress;
120 PVOID DmaVirtualAddress;
121 LARGE_INTEGER ReplyLogicalAddress;
122 PVOID ReplyVirtualAddress;
123 # else
124 uINT reserved1; // Reserved for future expansion
125 uINT reserved2; // Reserved for future expansion
126 uINT reserved3; // Reserved for future expansion
127 # endif
128 } drvrHBAinfo_S;
130 typedef struct TARGET_BUSY
132 uLONG channel;
133 uLONG id;
134 uLONG lun;
135 uLONG isBusy;
136 } TARGET_BUSY_T;
138 #endif