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