Updated MSA by putting Specification element at the end of the header section
[mirror_edk2.git] / EdkModulePkg / Bus / Scsi / ScsiBus / Dxe / ScsiBus.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 ScsiBus.h
15
16 Abstract:
17
18 Header file for SCSI Bus Driver.
19
20 Revision History
21 ++*/
22
23 // TODO: fix comment to end with --*/
24 #ifndef _SCSI_BUS_H
25 #define _SCSI_BUS_H
26
27
28 #include <IndustryStandard/scsi.h>
29 //
30 // 1000 * 1000 * 10
31 //
32 #define ONE_SECOND_TIMER 10000000
33
34 #define SCSI_IO_DEV_SIGNATURE EFI_SIGNATURE_32 ('s', 'c', 'i', 'o')
35
36 typedef struct {
37 UINT32 Signature;
38
39 EFI_HANDLE Handle;
40 EFI_SCSI_IO_PROTOCOL ScsiIo;
41 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
42 EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru;
43
44 UINT32 Pun;
45 UINT64 Lun;
46 UINT8 ScsiDeviceType;
47 UINT8 ScsiVersion;
48 BOOLEAN RemovableDevice;
49 } SCSI_IO_DEV;
50
51 #define SCSI_IO_DEV_FROM_THIS(a) CR (a, SCSI_IO_DEV, ScsiIo, SCSI_IO_DEV_SIGNATURE)
52
53 //
54 // Global Variables
55 //
56 extern EFI_DRIVER_BINDING_PROTOCOL gScsiBusDriverBinding;
57 extern EFI_COMPONENT_NAME_PROTOCOL gScsiBusComponentName;
58
59 EFI_STATUS
60 EFIAPI
61 ScsiGetDeviceType (
62 IN EFI_SCSI_IO_PROTOCOL *This,
63 OUT UINT8 *DeviceType
64 )
65 /*++
66
67 Routine Description:
68
69 TODO: Add function description
70
71 Arguments:
72
73 This - TODO: add argument description
74 DeviceType - TODO: add argument description
75
76 Returns:
77
78 TODO: add return values
79
80 --*/
81 ;
82
83 EFI_STATUS
84 EFIAPI
85 ScsiResetBus (
86 IN EFI_SCSI_IO_PROTOCOL *This
87 )
88 /*++
89
90 Routine Description:
91
92 TODO: Add function description
93
94 Arguments:
95
96 This - TODO: add argument description
97
98 Returns:
99
100 TODO: add return values
101
102 --*/
103 ;
104
105 EFI_STATUS
106 EFIAPI
107 ScsiResetDevice (
108 IN EFI_SCSI_IO_PROTOCOL *This
109 )
110 /*++
111
112 Routine Description:
113
114 TODO: Add function description
115
116 Arguments:
117
118 This - TODO: add argument description
119
120 Returns:
121
122 TODO: add return values
123
124 --*/
125 ;
126
127 EFI_STATUS
128 EFIAPI
129 ScsiExecuteSCSICommand (
130 IN EFI_SCSI_IO_PROTOCOL *This,
131 IN OUT EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket,
132 IN EFI_EVENT Event
133 )
134 /*++
135
136 Routine Description:
137
138 TODO: Add function description
139
140 Arguments:
141
142 This - TODO: add argument description
143 CommandPacket - TODO: add argument description
144 Event - TODO: add argument description
145
146 Returns:
147
148 TODO: add return values
149
150 --*/
151 ;
152
153 EFI_STATUS
154 ScsiScanCreateDevice (
155 EFI_DRIVER_BINDING_PROTOCOL *This,
156 EFI_HANDLE Controller,
157 UINT32 Pun,
158 UINT64 Lun,
159 EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru,
160 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath
161 )
162 /*++
163
164 Routine Description:
165
166 TODO: Add function description
167
168 Arguments:
169
170 This - TODO: add argument description
171 Controller - TODO: add argument description
172 Pun - TODO: add argument description
173 Lun - TODO: add argument description
174 ScsiPassThru - TODO: add argument description
175 ParentDevicePath - TODO: add argument description
176
177 Returns:
178
179 TODO: add return values
180
181 --*/
182 ;
183
184 BOOLEAN
185 DiscoverScsiDevice (
186 SCSI_IO_DEV *ScsiIoDevice
187 )
188 /*++
189
190 Routine Description:
191
192 TODO: Add function description
193
194 Arguments:
195
196 ScsiIoDevice - TODO: add argument description
197
198 Returns:
199
200 TODO: add return values
201
202 --*/
203 ;
204
205 EFI_STATUS
206 GetLunList (
207 EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru,
208 UINT32 Target,
209 UINT64 **LunArray,
210 UINTN *NumberOfLuns
211 )
212 /*++
213
214 Routine Description:
215
216 TODO: Add function description
217
218 Arguments:
219
220 ScsiPassThru - TODO: add argument description
221 Target - TODO: add argument description
222 LunArray - TODO: add argument description
223 NumberOfLuns - TODO: add argument description
224
225 Returns:
226
227 TODO: add return values
228
229 --*/
230 ;
231
232 EFI_STATUS
233 ScsiBusSubmitReportLunCommand (
234 EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru,
235 UINT32 Target,
236 UINTN AllocationLength,
237 VOID *Buffer,
238 EFI_SCSI_SENSE_DATA *SenseData,
239 UINT8 *SenseDataLength,
240 UINT8 *HostAdapterStatus,
241 UINT8 *TargetStatus
242 )
243 /*++
244
245 Routine Description:
246
247 TODO: Add function description
248
249 Arguments:
250
251 ScsiPassThru - TODO: add argument description
252 Target - TODO: add argument description
253 AllocationLength - TODO: add argument description
254 Buffer - TODO: add argument description
255 SenseData - TODO: add argument description
256 SenseDataLength - TODO: add argument description
257 HostAdapterStatus - TODO: add argument description
258 TargetStatus - TODO: add argument description
259
260 Returns:
261
262 TODO: add return values
263
264 --*/
265 ;
266 #endif