1 | /*
|
---|
2 | * This file should be source compatible with the Adaptec winaspi.h
|
---|
3 | * All DOS ASPI structures are the same as WINASPI
|
---|
4 | *
|
---|
5 | * Copyright (C) 2000 Alexandre Julliard
|
---|
6 | *
|
---|
7 | * This library is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU Lesser General Public
|
---|
9 | * License as published by the Free Software Foundation; either
|
---|
10 | * version 2.1 of the License, or (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This library is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
15 | * Lesser General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU Lesser General Public
|
---|
18 | * License along with this library; if not, write to the Free Software
|
---|
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
20 | */
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
24 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
25 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
26 | * a choice of LGPL license versions is made available with the language indicating
|
---|
27 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
28 | * of the LGPL is applied is otherwise unspecified.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #ifndef __WINASPI_H__
|
---|
32 | #define __WINASPI_H__
|
---|
33 |
|
---|
34 | /* Include base aspi defs */
|
---|
35 | #include <wnaspi32.h>
|
---|
36 |
|
---|
37 | #ifdef __cplusplus
|
---|
38 | extern "C" {
|
---|
39 | #endif /* #ifdef __cplusplus */
|
---|
40 |
|
---|
41 | /* WINE SCSI Stuff */
|
---|
42 | #define ASPI_DOS 1
|
---|
43 | #define ASPI_WIN16 2
|
---|
44 |
|
---|
45 | #include <pshpack1.h>
|
---|
46 |
|
---|
47 | /* SRB HA_INQUIRY */
|
---|
48 |
|
---|
49 | typedef struct tagSRB16_HaInquiry {
|
---|
50 | BYTE SRB_Cmd;
|
---|
51 | BYTE SRB_Status;
|
---|
52 | BYTE SRB_HaId;
|
---|
53 | BYTE SRB_Flags;
|
---|
54 | WORD SRB_55AASignature;
|
---|
55 | WORD SRB_ExtBufferSize;
|
---|
56 | BYTE HA_Count;
|
---|
57 | BYTE HA_SCSI_ID;
|
---|
58 | BYTE HA_ManagerId[16];
|
---|
59 | BYTE HA_Identifier[16];
|
---|
60 | BYTE HA_Unique[16];
|
---|
61 | BYTE HA_ExtBuffer[4];
|
---|
62 | } SRB_HaInquiry16, *PSRB_HaInquiry16, *LPSRB_HaInquiry16;
|
---|
63 |
|
---|
64 | typedef struct tagSRB16_GDEVBlock {
|
---|
65 | BYTE SRB_Cmd; /* ASPI command code = SC_GET_DEV_TYPE */
|
---|
66 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
67 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
68 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
69 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
70 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
71 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
72 | BYTE SRB_DeviceType; /* Target's peripheral device type */
|
---|
73 | } SRB_GDEVBlock16, *PSRB_GDEVBlock16, *LPSRB_GDEVBlock16;
|
---|
74 |
|
---|
75 |
|
---|
76 | typedef struct tagSRB16_ExecSCSICmd {
|
---|
77 | BYTE SRB_Cmd; /* ASPI command code (W) */
|
---|
78 | BYTE SRB_Status; /* ASPI command status byte (R) */
|
---|
79 | BYTE SRB_HaId; /* ASPI host adapter number (W) */
|
---|
80 | BYTE SRB_Flags; /* ASPI request flags (W) */
|
---|
81 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 (-) */
|
---|
82 | BYTE SRB_Target; /* Target's SCSI ID (W) */
|
---|
83 | BYTE SRB_Lun; /* Target's LUN number (W) */
|
---|
84 | DWORD SRB_BufLen; /* Data Allocation LengthPG (W/R)*/
|
---|
85 | BYTE SRB_SenseLen; /* Sense Allocation Length (W) */
|
---|
86 | SEGPTR SRB_BufPointer; /* Data Buffer Pointer (W) */
|
---|
87 | DWORD SRB_Rsvd1; /* Reserved, MUST = 0 (-/W)*/
|
---|
88 | BYTE SRB_CDBLen; /* CDB Length = 6 (W) */
|
---|
89 | BYTE SRB_HaStat; /* Host Adapter Status (R) */
|
---|
90 | BYTE SRB_TargStat; /* Target Status (R) */
|
---|
91 | FARPROC16 SRB_PostProc; /* Post routine (W) */
|
---|
92 | BYTE SRB_Rsvd2[34]; /* Reserved, MUST = 0 */
|
---|
93 | BYTE CDBByte[1]; /* SCSI CBD - variable length (W) */
|
---|
94 | /* variable example for 6 byte cbd
|
---|
95 | * BYTE CDBByte[6]; * SCSI CDB (W) *
|
---|
96 | * BYTE SenseArea6[SENSE_LEN]; * Request Sense buffer (R) *
|
---|
97 | */
|
---|
98 | } SRB_ExecSCSICmd16, *PSRB_ExecSCSICmd16, *LPSRB_ExecSCSICmd16;
|
---|
99 |
|
---|
100 | typedef struct tagSRB16_Abort {
|
---|
101 | BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
|
---|
102 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
103 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
104 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
105 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
106 | SEGPTR SRB_ToAbort; /* Pointer to SRB to abort */
|
---|
107 | } SRB_Abort16, *PSRB_Abort16, *LPSRB_Abort16;
|
---|
108 |
|
---|
109 |
|
---|
110 | typedef struct tagSRB16_BusDeviceReset {
|
---|
111 | BYTE SRB_Cmd; /* ASPI command code = SC_RESET_DEV */
|
---|
112 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
113 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
114 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
115 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
116 | BYTE SRB_Target; /* Target's SCSI ID */
|
---|
117 | BYTE SRB_Lun; /* Target's LUN number */
|
---|
118 | BYTE SRB_ResetRsvd1[14]; /* Reserved, MUST = 0 */
|
---|
119 | BYTE SRB_HaStat; /* Host Adapter Status */
|
---|
120 | BYTE SRB_TargStat; /* Target Status */
|
---|
121 | FARPROC16 SRB_PostProc; /* Post routine */
|
---|
122 | BYTE SRB_ResetRsvd2[34]; /* Reserved, MUST = 0 */
|
---|
123 | } SRB_BusDeviceReset16, *PSRB_BusDeviceReset16, *LPSRB_BusDeviceReset16;
|
---|
124 |
|
---|
125 |
|
---|
126 | typedef struct tagSRB16_Common {
|
---|
127 | BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
|
---|
128 | BYTE SRB_Status; /* ASPI command status byte */
|
---|
129 | BYTE SRB_HaId; /* ASPI host adapter number */
|
---|
130 | BYTE SRB_Flags; /* ASPI request flags */
|
---|
131 | DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
---|
132 | } SRB_Common16, *PSRB_Common16, *LPSRB_Common16;
|
---|
133 |
|
---|
134 | typedef union tagSRB16 {
|
---|
135 | SRB_Common16 common;
|
---|
136 | SRB_HaInquiry16 inquiry;
|
---|
137 | SRB_ExecSCSICmd16 cmd;
|
---|
138 | SRB_Abort16 abort;
|
---|
139 | SRB_BusDeviceReset16 reset;
|
---|
140 | SRB_GDEVBlock16 devtype;
|
---|
141 | } SRB16, *LPSRB16;
|
---|
142 |
|
---|
143 | #include <poppack.h>
|
---|
144 |
|
---|
145 | extern WORD WINAPI SendASPICommand16(SEGPTR);
|
---|
146 | extern WORD WINAPI GetASPISupportInfo16(void);
|
---|
147 |
|
---|
148 | #ifdef __cplusplus
|
---|
149 | }
|
---|
150 | #endif /* #ifdef __cplusplus */
|
---|
151 |
|
---|
152 | #endif /* __WINE_WINASPI_H */
|
---|