]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiDriver.h
CommitLineData
12618416 1/** @file\r
94451634 2 The header file of IScsiDriver.c.\r
6a690e23 3\r
e5eed7d3
HT
4Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
7a444476 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
6a690e23 12\r
12618416 13**/\r
6a690e23 14\r
15#ifndef _ISCSI_DRIVER_H_\r
16#define _ISCSI_DRIVER_H_\r
17\r
9ece9bd3 18#include <Uefi.h>\r
6a690e23 19#include <Protocol/DevicePath.h>\r
20#include <Protocol/LoadedImage.h>\r
5451bd96 21#include <Protocol/HiiConfigAccess.h>\r
22#include <Protocol/HiiDatabase.h>\r
6a690e23 23#include <Library/UefiDriverEntryPoint.h>\r
24#include <Library/UefiBootServicesTableLib.h>\r
25#include <Library/UefiLib.h>\r
26#include <Library/DevicePathLib.h>\r
9cb8724d 27#include <Protocol/DriverBinding.h>\r
28#include <Protocol/ScsiPassThruExt.h>\r
94451634 29\r
6a690e23 30#define ISCSI_PRIVATE_GUID \\r
36a975dd 31 { 0xfa3cde4c, 0x87c2, 0x427d, {0xae, 0xde, 0x7d, 0xd0, 0x96, 0xc8, 0x8c, 0x58} }\r
6a690e23 32\r
33#define ISCSI_INITIATOR_NAME_VAR_NAME L"I_NAME"\r
34\r
5af5b3fd 35extern EFI_GUID gIScsiPrivateGuid;\r
6a690e23 36\r
37typedef struct _ISCSI_PRIVATE_PROTOCOL {\r
38 UINT32 Reserved;\r
39} ISCSI_PRIVATE_PROTOCOL;\r
40\r
fd6f5e52 41//\r
42// EFI Driver Binding Protocol for iSCSI driver.\r
43//\r
12618416 44\r
94451634 45/**\r
46 Tests to see if this driver supports a given controller. If a child device is provided, \r
47 it further tests to see if this driver supports creating a handle for the specified child device.\r
48\r
753f9e69 49 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
50 @param[in] ControllerHandle The handle of the controller to test. This handle \r
51 must support a protocol interface that supplies \r
52 an I/O abstraction to the driver.\r
53 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. \r
54 This parameter is ignored by device drivers, and is optional for bus drivers.\r
55\r
56\r
57 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
58 RemainingDevicePath is supported by the driver specified by This.\r
59 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
60 RemainingDevicePath is already being managed by the driver\r
61 specified by This.\r
62 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
63 RemainingDevicePath is already being managed by a different\r
64 driver or an application that requires exclusive acces.\r
65 Currently not implemented.\r
66 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
67 RemainingDevicePath is not supported by the driver specified by This.\r
12618416 68**/\r
6a690e23 69EFI_STATUS\r
70EFIAPI\r
71IScsiDriverBindingSupported (\r
72 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
73 IN EFI_HANDLE ControllerHandle,\r
74 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
75 );\r
76\r
12618416 77/**\r
94451634 78 Start this driver on ControllerHandle. The Start() function is designed to be \r
79 invoked from the EFI boot service ConnectController(). As a result, much of \r
80 the error checking on the parameters to Start() has been moved into this \r
81 common boot service. It is legal to call Start() from other locations, \r
82 but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
83 1. ControllerHandle must be a valid EFI_HANDLE.\r
84 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
85 EFI_DEVICE_PATH_PROTOCOL.\r
86 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
87 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r
88\r
753f9e69 89 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
90 @param[in] ControllerHandle The handle of the controller to start. This handle \r
91 must support a protocol interface that supplies \r
92 an I/O abstraction to the driver.\r
93 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. \r
94 This parameter is ignored by device drivers, and is optional for bus drivers.\r
95\r
96 @retval EFI_SUCCESS The device was started.\r
97 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.\r
98 Currently not implemented.\r
99 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
100 @retval Others The driver failded to start the device.\r
12618416 101**/\r
6a690e23 102EFI_STATUS\r
103EFIAPI\r
104IScsiDriverBindingStart (\r
105 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
106 IN EFI_HANDLE ControllerHandle,\r
107 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
108 );\r
109\r
12618416 110/**\r
94451634 111 Stop this driver on ControllerHandle. \r
112 \r
113 Release the control of this controller and remove the IScsi functions. The Stop()\r
114 function is designed to be invoked from the EFI boot service DisconnectController(). \r
115 As a result, much of the error checking on the parameters to Stop() has been moved \r
116 into this common boot service. It is legal to call Stop() from other locations, \r
117 but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
118 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
119 same driver's Start() function.\r
120 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
121 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
122 Start() function, and the Start() function must have called OpenProtocol() on\r
123 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
124 \r
753f9e69 125 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
126 @param[in] ControllerHandle A handle to the device being stopped. The handle must \r
127 support a bus specific I/O protocol for the driver \r
128 to use to stop the device.\r
129 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.Not used.\r
130 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r
131 if NumberOfChildren is 0.Not used.\r
132\r
133 @retval EFI_SUCCESS The device was stopped.\r
134 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
12618416 135**/\r
6a690e23 136EFI_STATUS\r
137EFIAPI\r
138IScsiDriverBindingStop (\r
139 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
140 IN EFI_HANDLE ControllerHandle,\r
141 IN UINTN NumberOfChildren,\r
c5de0d55 142 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
6a690e23 143 );\r
144\r
6a690e23 145#endif\r