Added a few missing imports.
[wine/hacks.git] / include / winaspi.h
blob4d79c4c569367f9962ad6ab869db49947636822f
1 /**************************************************************************
2 * WINE winaspi.h
3 * This file should be source compatible with the Adaptec winaspi.h
4 * All DOS ASPI structures are the same as WINASPI
5 */
7 /* If __WINE__ is not defined, extra typedefs are defined to be
8 * source compatible with the regular winaspi.h.
9 */
10 #ifndef __WINASPI_H__
11 #define __WINASPI_H__
13 #define FAR
14 /* Include base aspi defs */
15 #include "aspi.h"
17 #include "pshpack1.h"
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* #ifdef __cplusplus */
22 /* WINE SCSI Stuff */
23 #define ASPI_DOS 1
24 #define ASPI_WIN16 2
26 /* SRB HA_INQUIRY */
28 struct tagSRB16_HaInquiry {
29 BYTE SRB_Cmd;
30 BYTE SRB_Status;
31 BYTE SRB_HaId;
32 BYTE SRB_Flags;
33 WORD SRB_55AASignature;
34 WORD SRB_ExtBufferSize;
35 BYTE HA_Count;
36 BYTE HA_SCSI_ID;
37 BYTE HA_ManagerId[16];
38 BYTE HA_Identifier[16];
39 BYTE HA_Unique[16];
40 BYTE HA_ExtBuffer[4];
41 } WINE_PACKED;
43 struct tagSRB16_GDEVBlock {
44 BYTE SRB_Cmd; /* ASPI command code = SC_GET_DEV_TYPE */
45 BYTE SRB_Status; /* ASPI command status byte */
46 BYTE SRB_HaId; /* ASPI host adapter number */
47 BYTE SRB_Flags; /* ASPI request flags */
48 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
49 BYTE SRB_Target; /* Target's SCSI ID */
50 BYTE SRB_Lun; /* Target's LUN number */
51 BYTE SRB_DeviceType; /* Target's peripheral device type */
52 } WINE_PACKED;
56 struct tagSRB16_ExecSCSICmd {
57 BYTE SRB_Cmd; /* ASPI command code (W) */
58 BYTE SRB_Status; /* ASPI command status byte (R) */
59 BYTE SRB_HaId; /* ASPI host adapter number (W) */
60 BYTE SRB_Flags; /* ASPI request flags (W) */
61 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 (-) */
62 BYTE SRB_Target; /* Target's SCSI ID (W) */
63 BYTE SRB_Lun; /* Target's LUN number (W) */
64 DWORD SRB_BufLen; /* Data Allocation LengthPG (W/R)*/
65 BYTE SRB_SenseLen; /* Sense Allocation Length (W) */
66 SEGPTR SRB_BufPointer; /* Data Buffer Pointer (W) */
67 DWORD SRB_Rsvd1; /* Reserved, MUST = 0 (-/W)*/
68 BYTE SRB_CDBLen; /* CDB Length = 6 (W) */
69 BYTE SRB_HaStat; /* Host Adapter Status (R) */
70 BYTE SRB_TargStat; /* Target Status (R) */
71 FARPROC16 SRB_PostProc; /* Post routine (W) */
72 BYTE SRB_Rsvd2[34]; /* Reserved, MUST = 0 */
73 BYTE CDBByte[0]; /* SCSI CBD - variable length (W) */
74 /* variable example for 6 byte cbd
75 * BYTE CDBByte[6]; * SCSI CDB (W) *
76 * BYTE SenseArea6[SENSE_LEN]; * Request Sense buffer (R) *
78 } WINE_PACKED;
80 struct tagSRB16_Abort {
81 BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
82 BYTE SRB_Status; /* ASPI command status byte */
83 BYTE SRB_HaId; /* ASPI host adapter number */
84 BYTE SRB_Flags; /* ASPI request flags */
85 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
86 SEGPTR SRB_ToAbort; /* Pointer to SRB to abort */
87 } WINE_PACKED;
89 struct tagSRB16_BusDeviceReset {
90 BYTE SRB_Cmd; /* ASPI command code = SC_RESET_DEV */
91 BYTE SRB_Status; /* ASPI command status byte */
92 BYTE SRB_HaId; /* ASPI host adapter number */
93 BYTE SRB_Flags; /* ASPI request flags */
94 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
95 BYTE SRB_Target; /* Target's SCSI ID */
96 BYTE SRB_Lun; /* Target's LUN number */
97 BYTE SRB_ResetRsvd1[14]; /* Reserved, MUST = 0 */
98 BYTE SRB_HaStat; /* Host Adapter Status */
99 BYTE SRB_TargStat; /* Target Status */
100 FARPROC16 SRB_PostProc; /* Post routine */
101 BYTE SRB_ResetRsvd2[34]; /* Reserved, MUST = 0 */
102 } WINE_PACKED;
104 struct tagSRB16_Common {
105 BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
106 BYTE SRB_Status; /* ASPI command status byte */
107 BYTE SRB_HaId; /* ASPI host adapter number */
108 BYTE SRB_Flags; /* ASPI request flags */
109 DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
110 } WINE_PACKED;
112 union tagSRB16 {
113 struct tagSRB16_Common common;
114 struct tagSRB16_HaInquiry inquiry;
115 struct tagSRB16_ExecSCSICmd cmd;
116 struct tagSRB16_Abort abort;
117 struct tagSRB16_BusDeviceReset reset;
118 struct tagSRB16_GDEVBlock devtype;
121 #ifndef __WINE__
122 /* These typedefs would conflict with WNASPI32 typedefs, but
123 * would make it easier to port WINASPI source to WINE */
124 typedef struct tagSRB16_HaInquiry
125 SRB_HAInquiry, *PSRB_HAInquiry, FAR *LPSRB_HAInquiry;
127 typedef struct tagSRB16_GDEVBlock
128 SRB_GDEVBlock, *PSRB_GDEVBlock, FAR *LPSRB_GDEVBlock;
130 typedef struct tagSRB16_ExecSCSICmd
131 SRB_ExecSCSICmd, *PSRB_ExecSCSICmd, FAR *LPSRB_ExecSCSICmd;
133 typedef struct tagSRB16_Abort
134 SRB_Abort, *PSRB_Abort, FAR *LPSRB_Abort;
136 typedef struct tagSRB16_BusDeviceReset
137 SRB_BusDeviceReset, *PSRB_BusDeviceReset, FAR *LPSRB_BusDeviceReset;
139 typedef struct tagSRB16_Common
140 SRB_Common, *PSRB_Common, FAR *LPSRB_Common;
142 typedef union tagSRB16 SRB, FAR *LPSRB;
144 extern WORD FAR PASCAL SendASPICommand( LPSRB );
145 extern WORD FAR PASCAL GetASPISupportInfo( VOID );
147 #endif
149 /* These are the typedefs for WINE */
150 typedef struct tagSRB16_HaInquiry
151 SRB_HAInquiry16, *PSRB_HAInquiry16, FAR *LPSRB_HAInquiry16;
153 typedef struct tagSRB16_GDEVBlock
154 SRB_GDEVBlock16, *PSRB_GDEVBlock16, FAR *LPSRB_GDEVBlock16;
156 typedef struct tagSRB16_ExecSCSICmd
157 SRB_ExecSCSICmd16, *PSRB_ExecSCSICmd16, FAR *LPSRB_ExecSCSICmd16;
159 typedef struct tagSRB16_Abort
160 SRB_Abort16, *PSRB_Abort16, FAR *LPSRB_Abort16;
162 typedef struct tagSRB16_BusDeviceReset
163 SRB_BusDeviceReset16, *PSRB_BusDeviceReset16, FAR *LPSRB_BusDeviceReset16;
165 typedef struct tagSRB16_Common
166 SRB_Common16, *PSRB_Common16, FAR *LPSRB_Common16;
168 typedef union tagSRB16 SRB16, FAR *LPSRB16;
170 #ifdef __cplusplus
172 #endif /* #ifdef __cplusplus */
174 #include "poppack.h"
176 #endif /* __WINE_WINASPI_H */