diff options
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c | 160 |
1 files changed, 70 insertions, 90 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c index de93240b05..beee62c51b 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c @@ -1,4 +1,5 @@ -/*++
+/** @file
+ The entry point of IScsi driver
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -14,8 +15,9 @@ Module Name: IScsiDriver.c
Abstract:
+ The entry point of IScsi driver
---*/
+**/
#include "IScsiImpl.h"
@@ -30,32 +32,29 @@ EFI_DRIVER_BINDING_PROTOCOL gIScsiDriverBinding = { EFI_GUID mIScsiPrivateGuid = ISCSI_PRIVATE_GUID;
-EFI_STATUS
-EFIAPI
-IScsiDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL * This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
- )
-/*++
+/**
+ Test to see if IScsi driver supports the given controller.
-Routine Description:
+ @param This[in] Protocol instance pointer.
- Test to see if iSCSI driver supports the given controller.
+ @param ControllerHandle[in] Handle of controller to test.
-Arguments:
+ @param RemainingDevicePath[in] Optional parameter use to pick a specific child device to start.
- This - Protocol instance pointer.
- ControllerHandle - Handle of controller to test.
- RemainingDevicePath - Optional parameter use to pick a specific child device to start.
+ @retval EFI_SUCCES This driver supports the controller.
-Returns:
+ @retval EFI_ALREADY_STARTED This driver is already running on this device.
- EFI_SUCCES - This driver supports the controller.
- EFI_ALREADY_STARTED - This driver is already running on this device.
- EFI_UNSUPPORTED - This driver doesn't support the controller.
+ @retval EFI_UNSUPPORTED This driver doesn't support the controller.
---*/
+**/
+EFI_STATUS
+EFIAPI
+IScsiDriverBindingSupported (
+ IN EFI_DRIVER_BINDING_PROTOCOL * This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
+ )
{
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *CurrentDevicePath;
@@ -100,6 +99,20 @@ Returns: return EFI_SUCCESS;
}
+/**
+ Start to manage the controller.
+
+ @param This[in] Protocol instance pointer.
+
+ @param ControllerHandle[in] Handle of the controller.
+
+ @param RemainingDevicePath[in] Optional parameter use to pick a specific child device to start.
+
+ @retval EFI_SUCCES This driver supports this device.
+
+ @retval EFI_ALREADY_STARTED This driver is already running on this device.
+
+**/
EFI_STATUS
EFIAPI
IScsiDriverBindingStart (
@@ -107,24 +120,6 @@ IScsiDriverBindingStart ( IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
)
-/*++
-
-Routine Description:
-
- Start to manage the controller.
-
-Arguments:
-
- This - Protocol instance pointer.
- ControllerHandle - Handle of the controller.
- RemainingDevicePath - Optional parameter use to pick a specific child device to start.
-
-Returns:
-
- EFI_SUCCES - This driver supports this device.
- EFI_ALREADY_STARTED - This driver is already running on this device.
-
---*/
{
EFI_STATUS Status;
ISCSI_DRIVER_DATA *Private;
@@ -209,6 +204,20 @@ ON_ERROR: return Status;
}
+/**
+ Release the control of this controller and remove the IScsi functions.
+
+ @param This[in] Protocol instance pointer.
+
+ @param ControllerHandle[in] Handle of controller to stop.
+
+ @param NumberOfChildren[in] Not used.
+
+ @param ChildHandleBuffer[in] Not used.
+
+ @retval EFI_SUCCES This driver supports this device.
+
+**/
EFI_STATUS
EFIAPI
IScsiDriverBindingStop (
@@ -217,24 +226,6 @@ IScsiDriverBindingStop ( IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
-Routine Description:
-
- Release the control of this controller and remove the iSCSI functions.
-
-Arguments:
-
- This - Protocol instance pointer.
- ControllerHandle - Handle of controller to stop.
- NumberOfChildren - Not used.
- ChildHandleBuffer - Not used.
-
-Returns:
-
- EFI_SUCCES - This driver supports this device.
-
---*/
{
EFI_HANDLE IScsiController;
EFI_STATUS Status;
@@ -315,27 +306,21 @@ Returns: return EFI_SUCCESS;
}
-EFI_STATUS
-EFIAPI
-EfiIScsiUnload (
- IN EFI_HANDLE ImageHandle
- )
-/*++
-
-Routine Description:
-
+/**
Unload the iSCSI driver.
-Arguments:
-
- ImageHandle - The handle of the driver image.
+ @param ImageHandle[in] The handle of the driver image.
-Returns:
+ @retval EFI_SUCCESS The driver is unloaded.
- EFI_SUCCESS - The driver is unloaded.
- EFI_DEVICE_ERROR - Some unexpected error happened.
+ @retval EFI_DEVICE_ERROR Some unexpected error happened.
---*/
+**/
+EFI_STATUS
+EFIAPI
+EfiIScsiUnload (
+ IN EFI_HANDLE ImageHandle
+ )
{
EFI_STATUS Status;
UINTN DeviceHandleCount;
@@ -389,29 +374,24 @@ Returns: return Status;
}
-EFI_STATUS
-EFIAPI
-IScsiDriverEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
+/**
Initialize the global variables publish the driver binding protocol.
-Arguments:
+ @param ImageHandle[in] The handle of the driver image.
- ImageHandle - The handle of the driver image.
- SystemTable - The EFI system table.
+ @param SystemTable[in] The EFI system table.
-Returns:
+ @retval EFI_SUCCESS The protocols are installed.
- EFI_SUCCESS - The protocols are installed.
- EFI_DEVICE_ERROR - Some unexpected error happened.
+ @retval EFI_DEVICE_ERROR Some unexpected error happened.
---*/
+**/
+EFI_STATUS
+EFIAPI
+IScsiDriverEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
{
EFI_STATUS Status;
EFI_ISCSI_INITIATOR_NAME_PROTOCOL *IScsiInitiatorName;
|