]> git.proxmox.com Git - mirror_edk2.git/commitdiff
apply for doxgen format.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Apr 2008 08:33:17 +0000 (08:33 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Apr 2008 08:33:17 +0000 (08:33 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5030 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Decode.c
MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.c
MdeModulePkg/Bus/Pci/UndiRuntimeDxe/E100b.h
MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Init.c
MdeModulePkg/Bus/Pci/UndiRuntimeDxe/Undi32.h

index df5a6b5ac5539ba691aa5eb648f1add292e91f37..a898eebecb704af50bc27fbc4c2bd4cf69e38cb2 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Provides the basic UNID functions.\r
 \r
 Copyright (c) 2006 - 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,16 +10,8 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module name:\r
-    decode.c\r
+**/\r
 \r
-Abstract:\r
-\r
-Revision history:\r
-\r
---*/\r
-\r
-// TODO: fix comment to add: Module Name: DECODE.C\r
 #include "Undi32.h"\r
 \r
 //\r
@@ -49,53 +42,41 @@ UNDI_CALL_TABLE api_table[PXE_OPCODE_LAST_VALID+1] = { \
 // end of global variables\r
 //\r
 \r
-VOID\r
-UNDI_GetState (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine determines the operational state of the UNDI.  It updates the state flags in the\r
   Command Descriptor Block based on information derived from the AdapterInfo instance data.\r
-\r
   To ensure the command has completed successfully, CdbPtr->StatCode will contain the result of\r
   the command execution.\r
-\r
   The CdbPtr->StatFlags will contain a STOPPED, STARTED, or INITIALIZED state once the command\r
   has successfully completed.\r
-\r
   Keep in mind the AdapterInfo->State is the active state of the adapter (based on software\r
   interrogation), and the CdbPtr->StateFlags is the passed back information that is reflected\r
   to the caller of the UNDI API.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_GetState (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   CdbPtr->StatFlags = (PXE_STATFLAGS) (CdbPtr->StatFlags | AdapterInfo->State);\r
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Start (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to change the operational state of the UNDI from stopped to started.\r
   It will do this as long as the adapter's state is PXE_STATFLAGS_GET_STATE_STOPPED, otherwise\r
   the CdbPtr->StatFlags will reflect a command failure, and the CdbPtr->StatCode will reflect the\r
   UNDI as having already been started.\r
-\r
   This routine is modified to reflect the undi 1.1 specification changes. The\r
   changes in the spec are mainly in the callback routines, the new spec adds\r
   3 more callbacks and a unique id.\r
@@ -106,17 +87,20 @@ Routine Description:
   and Sync_Mem routines and a unique id variable for the new version.\r
   This is the function which an external entity (SNP, O/S, etc) would call\r
   to provide it's I/O abstraction to the UNDI.\r
-\r
   It's final action is to change the AdapterInfo->State to PXE_STATFLAGS_GET_STATE_STARTED.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Start (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_CPB_START_30  *CpbPtr;\r
   PXE_CPB_START_31  *CpbPtr_31;\r
@@ -187,31 +171,27 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Stop (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to change the operational state of the UNDI from started to stopped.\r
   It will not do this if the adapter's state is PXE_STATFLAGS_GET_STATE_INITIALIZED, otherwise\r
   the CdbPtr->StatFlags will reflect a command failure, and the CdbPtr->StatCode will reflect the\r
   UNDI as having already not been shut down.\r
-\r
   The NIC's data structure will have the Delay, Virt2Phys, and Block, pointers zero'd out..\r
-\r
   It's final action is to change the AdapterInfo->State to PXE_STATFLAGS_GET_STATE_STOPPED.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Stop (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   if (AdapterInfo->State == PXE_STATFLAGS_GET_STATE_INITIALIZED) {\r
     CdbPtr->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;\r
@@ -236,31 +216,27 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_GetInitInfo (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to retrieve the initialization information that is needed by drivers and\r
   applications to initialize the UNDI.  This will fill in data in the Data Block structure that is\r
   pointed to by the caller's CdbPtr->DBaddr.  The fields filled in are as follows:\r
-\r
   MemoryRequired, FrameDataLen, LinkSpeeds[0-3], NvCount, NvWidth, MediaHeaderLen, HWaddrLen,\r
   MCastFilterCnt, TxBufCnt, TxBufSize, RxBufCnt, RxBufSize, IFtype, Duplex, and LoopBack.\r
-\r
   In addition, the CdbPtr->StatFlags ORs in that this NIC supports cable detection.  (APRIORI knowledge)\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_GetInitInfo (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_DB_GET_INIT_INFO  *DbPtr;\r
 \r
@@ -292,30 +268,26 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_GetConfigInfo (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to retrieve the configuration information about the NIC being controlled by\r
   this driver.  This will fill in data in the Data Block structure that is pointed to by the caller's CdbPtr->DBaddr.\r
   The fields filled in are as follows:\r
-\r
   DbPtr->pci.BusType, DbPtr->pci.Bus, DbPtr->pci.Device, and DbPtr->pci.\r
-\r
   In addition, the DbPtr->pci.Config.Dword[0-63] grabs a copy of this NIC's PCI configuration space.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_GetConfigInfo (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT16                  Index;\r
   PXE_DB_GET_CONFIG_INFO  *DbPtr;\r
@@ -334,37 +306,32 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Initialize (\r
-  IN  PXE_CDB       *CdbPtr,\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine resets the network adapter and initializes the UNDI using the parameters supplied in\r
   the CPB.  This command must be issued before the network adapter can be setup to transmit and\r
   receive packets.\r
-\r
   Once the memory requirements of the UNDI are obtained by using the GetInitInfo command, a block\r
   of non-swappable memory may need to be allocated.  The address of this memory must be passed to\r
   UNDI during the Initialize in the CPB.  This memory is used primarily for transmit and receive buffers.\r
-\r
   The fields CableDetect, LinkSpeed, Duplex, LoopBack, MemoryPtr, and MemoryLength are set with information\r
   that was passed in the CPB and the NIC is initialized.\r
-\r
   If the NIC initialization fails, the CdbPtr->StatFlags are updated with PXE_STATFLAGS_COMMAND_FAILED\r
   Otherwise, AdapterInfo->State is updated with PXE_STATFLAGS_GET_STATE_INITIALIZED showing the state of\r
   the UNDI is now initialized.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Initialize (\r
+  IN  PXE_CDB       *CdbPtr,\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_CPB_INITIALIZE  *CpbPtr;\r
 \r
@@ -414,27 +381,24 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Reset (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine resets the network adapter and initializes the UNDI using the parameters supplied in\r
   the CPB.  The transmit and receive queues are emptied and any pending interrupts are cleared.\r
-\r
   If the NIC reset fails, the CdbPtr->StatFlags are updated with PXE_STATFLAGS_COMMAND_FAILED\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Reset (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   if (CdbPtr->OpFlags != PXE_OPFLAGS_NOT_USED &&\r
       CdbPtr->OpFlags != PXE_OPFLAGS_RESET_DISABLE_INTERRUPTS &&\r
@@ -452,32 +416,28 @@ Returns:
   }\r
 }\r
 \r
-VOID\r
-UNDI_Shutdown (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine resets the network adapter and leaves it in a safe state for another driver to\r
   initialize.  Any pending transmits or receives are lost.  Receive filters and external\r
   interrupt enables are disabled.  Once the UNDI has been shutdown, it can then be stopped\r
   or initialized again.\r
-\r
   If the NIC reset fails, the CdbPtr->StatFlags are updated with PXE_STATFLAGS_COMMAND_FAILED\r
-\r
   Otherwise, AdapterInfo->State is updated with PXE_STATFLAGS_GET_STATE_STARTED showing the state of\r
   the NIC as being started.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Shutdown (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   //\r
   // do the shutdown stuff here\r
@@ -493,29 +453,26 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Interrupt (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine can be used to read and/or change the current external interrupt enable\r
   settings.  Disabling an external interrupt enable prevents and external (hardware)\r
   interrupt from being signaled by the network device.  Internally the interrupt events\r
   can still be polled by using the UNDI_GetState command.\r
-\r
   The resulting information on the interrupt state will be passed back in the CdbPtr->StatFlags.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Interrupt (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT8 IntMask;\r
 \r
@@ -573,25 +530,23 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_RecFilter (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to read and change receive filters and, if supported, read\r
   and change multicast MAC address filter list.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_RecFilter (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT16                  NewFilter;\r
   UINT16                  OpFlags;\r
@@ -753,25 +708,23 @@ BadCdb:
   CdbPtr->StatCode  = PXE_STATCODE_INVALID_CDB;\r
 }\r
 \r
-VOID\r
-UNDI_StnAddr (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to get the current station and broadcast MAC addresses, and to change the\r
   current station MAC address.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_StnAddr (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_CPB_STATION_ADDRESS *CpbPtr;\r
   PXE_DB_STATION_ADDRESS  *DbPtr;\r
@@ -822,17 +775,10 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Statistics (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to read and clear the NIC traffic statistics.  This command is supported only\r
   if the !PXE structure's Implementation flags say so.\r
-\r
   Results will be parsed out in the following manner:\r
   CdbPtr->DBaddr.Data[0]   R  Total Frames (Including frames with errors and dropped frames)\r
   CdbPtr->DBaddr.Data[1]   R  Good Frames (All frames copied into receive buffer)\r
@@ -845,14 +791,18 @@ Routine Description:
   CdbPtr->DBaddr.Data[E]   T  Dropped Frames (Frames that were dropped because of collisions)\r
   CdbPtr->DBaddr.Data[14]  T  Total Collision Frames (Total collisions on this subnet)\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Statistics (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   if ((CdbPtr->OpFlags &~(PXE_OPFLAGS_STATISTICS_RESET)) != 0) {\r
     CdbPtr->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;\r
@@ -872,27 +822,24 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_ip2mac (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to translate a multicast IP address to a multicast MAC address.\r
-\r
   This results in a MAC address composed of 25 bits of fixed data with the upper 23 bits of the IP\r
   address being appended to it.  Results passed back in the equivalent of CdbPtr->DBaddr->MAC[0-5].\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_ip2mac (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_CPB_MCAST_IP_TO_MAC *CpbPtr;\r
   PXE_DB_MCAST_IP_TO_MAC  *DbPtr;\r
@@ -934,27 +881,24 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_NVData (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to read and write non-volatile storage on the NIC (if supported).  The NVRAM\r
   could be EEPROM, FLASH, or battery backed RAM.\r
-\r
   This is an optional function according to the UNDI specification  (or will be......)\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_NVData (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_DB_NVDATA *DbPtr;\r
   UINT16        Index;\r
@@ -985,32 +929,28 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Status (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine returns the current interrupt status and/or the transmitted buffer addresses.\r
   If the current interrupt status is returned, pending interrupts will be acknowledged by this\r
   command.  Transmitted buffer addresses that are written to the DB are removed from the transmit\r
   buffer queue.\r
-\r
   Normally, this command would be polled with interrupts disabled.\r
-\r
   The transmit buffers are returned in CdbPtr->DBaddr->TxBufer[0 - NumEntries].\r
   The interrupt status is returned in CdbPtr->StatFlags.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Status (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_DB_GET_STATUS *DbPtr;\r
   PXE_DB_GET_STATUS TmpGetStatus;\r
@@ -1123,26 +1063,24 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_FillHeader (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to fill media header(s) in transmit packet(s).\r
   Copies the MAC address into the media header whether it is dealing\r
   with fragmented or non-fragmented packets.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_FillHeader (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PXE_CPB_FILL_HEADER             *Cpb;\r
   PXE_CPB_FILL_HEADER_FRAGMENTED  *Cpbf;\r
@@ -1198,40 +1136,34 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Transmit (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine is used to place a packet into the transmit queue.  The data buffers given to\r
   this command are to be considered locked and the application or network driver loses\r
   ownership of these buffers and must not free or relocate them until the ownership returns.\r
-\r
   When the packets are transmitted, a transmit complete interrupt is generated (if interrupts\r
   are disabled, the transmit interrupt status is still set and can be checked using the UNDI_Status\r
   command.\r
-\r
   Some implementations and adapters support transmitting multiple packets with one transmit\r
   command.  If this feature is supported, the transmit CPBs can be linked in one transmit\r
   command.\r
-\r
   All UNDIs support fragmented frames, now all network devices or protocols do.  If a fragmented\r
   frame CPB is given to UNDI and the network device does not support fragmented frames\r
   (see !PXE.Implementation flag), the UNDI will have to copy the fragments into a local buffer\r
   before transmitting.\r
 \r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @return None\r
 \r
-Returns:\r
-  None\r
-\r
---*/\r
+**/\r
+VOID\r
+UNDI_Transmit (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
 \r
   if (CdbPtr->CPBsize == PXE_CPBSIZE_NOT_USED) {\r
@@ -1249,26 +1181,24 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-UNDI_Receive (\r
-  IN  PXE_CDB           *CdbPtr,\r
-  IN  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   When the network adapter has received a frame, this command is used to copy the frame\r
   into the driver/application storage location.  Once a frame has been copied, it is\r
   removed from the receive queue.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+VOID\r
+UNDI_Receive (\r
+  IN  PXE_CDB           *CdbPtr,\r
+  IN  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
 \r
   //\r
@@ -1291,27 +1221,25 @@ Returns:
 }\r
 \r
 \r
-VOID\r
-UNDI_APIEntry_new (\r
-  IN  UINT64 cdb\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This is the main SW UNDI API entry using the newer nii protocol.\r
   The parameter passed in is a 64 bit flat model virtual\r
   address of the cdb.  We then jump into the common routine for both old and\r
   new nii protocol entries.\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
 // TODO:    cdb - add argument and description to function comment\r
+VOID\r
+UNDI_APIEntry_new (\r
+  IN  UINT64 cdb\r
+  )\r
 {\r
   PXE_CDB           *CdbPtr;\r
   NIC_DATA_INSTANCE *AdapterInfo;\r
@@ -1337,27 +1265,25 @@ Returns:
   UNDI_APIEntry_Common (cdb);\r
 }\r
 \r
-VOID\r
-UNDI_APIEntry_Common (\r
-  IN  UINT64 cdb\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This is the common routine for both old and new entry point procedures.\r
   The parameter passed in is a 64 bit flat model virtual\r
   address of the cdb.  We then jump into the service routine pointed to by the\r
   Api_Table[OpCode].\r
 \r
-Arguments:\r
-  CdbPtr            - Pointer to the command descriptor block.\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  CdbPtr               Pointer to the command descriptor block.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
 // TODO:    cdb - add argument and description to function comment\r
+VOID\r
+UNDI_APIEntry_Common (\r
+  IN  UINT64 cdb\r
+  )\r
 {\r
   PXE_CDB           *CdbPtr;\r
   NIC_DATA_INSTANCE *AdapterInfo;\r
@@ -1453,26 +1379,23 @@ badcdb:
   return ;\r
 }\r
 \r
-STATIC\r
-UINT8\r
-ChkSum (\r
-  IN  VOID   *Buffer,\r
-  IN  UINT16 Len\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This does an 8 bit check sum of the passed in buffer for Len bytes.\r
   This is primarily used to update the check sum in the SW UNDI header.\r
 \r
-Arguments:\r
-  Buffer            - Pointer to the passed in buffer to check sum\r
-  Len               - Length of buffer to be check summed in bytes.\r
+  @param  Buffer               Pointer to the passed in buffer to check sum\r
+  @param  Len                  Length of buffer to be check summed in bytes.\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
+STATIC\r
+UINT8\r
+ChkSum (\r
+  IN  VOID   *Buffer,\r
+  IN  UINT16 Len\r
+  )\r
 {\r
   UINT8 Chksum;\r
   INT8  *Bp;\r
@@ -1489,27 +1412,24 @@ Returns:
   return Chksum;\r
 }\r
 \r
-VOID\r
-PxeUpdate (\r
-  IN  NIC_DATA_INSTANCE *NicPtr,\r
-  IN PXE_SW_UNDI        *PxePtr\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   When called with a null NicPtr, this routine decrements the number of NICs\r
   this UNDI is supporting and removes the NIC_DATA_POINTER from the array.\r
   Otherwise, it increments the number of NICs this UNDI is supported and\r
   updates the pxe.Fudge to ensure a proper check sum results.\r
 \r
-Arguments:\r
-  NicPtr            - Pointer to the NIC data structure.\r
+  @param  NicPtr               Pointer to the NIC data structure.\r
 \r
-Returns:\r
-  None\r
+  @return None\r
 \r
---*/\r
+**/\r
 // TODO:    PxePtr - add argument and description to function comment\r
+VOID\r
+PxeUpdate (\r
+  IN  NIC_DATA_INSTANCE *NicPtr,\r
+  IN PXE_SW_UNDI        *PxePtr\r
+  )\r
 {\r
   if (NicPtr == NULL) {\r
     if (PxePtr->IFcnt > 0) {\r
@@ -1532,25 +1452,22 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-PxeStructInit (\r
-  IN PXE_SW_UNDI *PxePtr\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Initialize the !PXE structure\r
 \r
-Arguments:\r
-  RemainingDevicePath - Not used, always produce all possible children.\r
+  @param  RemainingDevicePath  Not used, always produce all possible children.\r
 \r
-Returns:\r
-  EFI_SUCCESS         - This driver is added to Controller.\r
-  other               - This driver does not support this device.\r
+  @retval EFI_SUCCESS          This driver is added to Controller.\r
+  @retval other                This driver does not support this device.\r
 \r
---*/\r
+**/\r
 // TODO:    PxePtr - add argument and description to function comment\r
 // TODO:    VersionFlag - add argument and description to function comment\r
+VOID\r
+PxeStructInit (\r
+  IN PXE_SW_UNDI *PxePtr\r
+  )\r
 {\r
   //\r
   // Initialize the !PXE structure\r
index 2bd7813b18c8305a045cdd19f7f769c6f92f4009..6612d46041102017930d69b8b601a7aa2a72215b 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Provides basic function upon network adapter card.\r
 \r
 Copyright (c) 2006, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,17 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-\r
- E100B.C\r
-\r
-Abstract:\r
-\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #include "Undi32.h"\r
 \r
@@ -50,28 +41,25 @@ static UINT8 basic_config_cmd[22] = {
     DelayIt (AdapterInfo, 50);    \\r
 }\r
 \r
-UINT8\r
-InByte (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT32            Port\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This function calls the MemIo callback to read a byte from the device's\r
   address space\r
   Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
   which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
   to make undi3.0 a special case\r
 \r
-Arguments:\r
-  Port              - Which port to read from.\r
+  @param  Port                            Which port to read from.\r
 \r
-Returns:\r
-  Results           - The data read from the port.\r
+  @retval Results                         The data read from the port.\r
 \r
---*/\r
+**/\r
 // TODO:    AdapterInfo - add argument and description to function comment\r
+UINT8\r
+InByte (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT32            Port\r
+  )\r
 {\r
   UINT8 Results;\r
 \r
@@ -85,28 +73,25 @@ Returns:
   return Results;\r
 }\r
 \r
-UINT16\r
-InWord (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT32            Port\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This function calls the MemIo callback to read a word from the device's\r
   address space\r
   Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
   which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
   to make undi3.0 a special case\r
 \r
-Arguments:\r
-  Port              - Which port to read from.\r
+  @param  Port                            Which port to read from.\r
 \r
-Returns:\r
-  Results           - The data read from the port.\r
+  @retval Results                         The data read from the port.\r
 \r
---*/\r
+**/\r
 // TODO:    AdapterInfo - add argument and description to function comment\r
+UINT16\r
+InWord (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT32            Port\r
+  )\r
 {\r
   UINT16  Results;\r
 \r
@@ -120,28 +105,25 @@ Returns:
   return Results;\r
 }\r
 \r
-UINT32\r
-InLong (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT32            Port\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This function calls the MemIo callback to read a dword from the device's\r
   address space\r
   Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
   which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
   to make undi3.0 a special case\r
 \r
-Arguments:\r
-  Port              - Which port to read from.\r
+  @param  Port                            Which port to read from.\r
 \r
-Returns:\r
-  Results           - The data read from the port.\r
+  @retval Results                         The data read from the port.\r
 \r
---*/\r
+**/\r
 // TODO:    AdapterInfo - add argument and description to function comment\r
+UINT32\r
+InLong (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT32            Port\r
+  )\r
 {\r
   UINT32  Results;\r
 \r
@@ -155,30 +137,27 @@ Returns:
   return Results;\r
 }\r
 \r
-VOID\r
-OutByte (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT8             Data,\r
-  IN UINT32            Port\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This function calls the MemIo callback to write a byte from the device's\r
   address space\r
   Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
   which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
   to make undi3.0 a special case\r
 \r
-Arguments:\r
-  Data              - Data to write to Port.\r
-  Port              - Which port to write to.\r
+  @param  Data                            Data to write to Port.\r
+  @param  Port                            Which port to write to.\r
 \r
-Returns:\r
-  none\r
+  @return none\r
 \r
---*/\r
+**/\r
 // TODO:    AdapterInfo - add argument and description to function comment\r
+VOID\r
+OutByte (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT8             Data,\r
+  IN UINT32            Port\r
+  )\r
 {\r
   UINT8 Val;\r
 \r
@@ -193,30 +172,27 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-OutWord (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT16            Data,\r
-  IN UINT32            Port\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This function calls the MemIo callback to write a word from the device's\r
   address space\r
   Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
   which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
   to make undi3.0 a special case\r
 \r
-Arguments:\r
-  Data              - Data to write to Port.\r
-  Port              - Which port to write to.\r
+  @param  Data                            Data to write to Port.\r
+  @param  Port                            Which port to write to.\r
 \r
-Returns:\r
-  none\r
+  @return none\r
 \r
---*/\r
+**/\r
 // TODO:    AdapterInfo - add argument and description to function comment\r
+VOID\r
+OutWord (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT16            Data,\r
+  IN UINT32            Port\r
+  )\r
 {\r
   UINT16  Val;\r
 \r
@@ -231,30 +207,27 @@ Returns:
   return ;\r
 }\r
 \r
-VOID\r
-OutLong (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT32            Data,\r
-  IN UINT32            Port\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This function calls the MemIo callback to write a dword from the device's\r
   address space\r
   Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
   which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
   to make undi3.0 a special case\r
 \r
-Arguments:\r
-  Data              - Data to write to Port.\r
-  Port              - Which port to write to.\r
+  @param  Data                            Data to write to Port.\r
+  @param  Port                            Which port to write to.\r
 \r
-Returns:\r
-  none\r
+  @return none\r
 \r
---*/\r
+**/\r
 // TODO:    AdapterInfo - add argument and description to function comment\r
+VOID\r
+OutLong (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT32            Data,\r
+  IN UINT32            Port\r
+  )\r
 {\r
   UINT32  Val;\r
 \r
@@ -269,6 +242,19 @@ Returns:
   return ;\r
 }\r
 \r
+\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  MemAddr                         TODO: add argument description\r
+  @param  Size                            TODO: add argument description\r
+  @param  Direction                       TODO: add argument description\r
+  @param  MappedAddr                      TODO: add argument description\r
+\r
+  @return TODO: add return values\r
+\r
+**/\r
 STATIC\r
 UINTN\r
 MapIt (\r
@@ -278,25 +264,6 @@ MapIt (
   IN UINT32            Direction,\r
   OUT UINT64           MappedAddr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  MemAddr     - TODO: add argument description\r
-  Size        - TODO: add argument description\r
-  Direction   - TODO: add argument description\r
-  MappedAddr  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   UINT64  *PhyAddr;\r
 \r
@@ -338,6 +305,19 @@ Returns:
   return PXE_STATCODE_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  MemAddr                         TODO: add argument description\r
+  @param  Size                            TODO: add argument description\r
+  @param  Direction                       TODO: add argument description\r
+  @param  MappedAddr                      TODO: add argument description\r
+\r
+  @return TODO: add return values\r
+\r
+**/\r
 STATIC\r
 VOID\r
 UnMapIt (\r
@@ -347,25 +327,6 @@ UnMapIt (
   IN UINT32            Direction,\r
   IN UINT64            MappedAddr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  MemAddr     - TODO: add argument description\r
-  Size        - TODO: add argument description\r
-  Direction   - TODO: add argument description\r
-  MappedAddr  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   if (AdapterInfo->VersionFlag > 0x30) {\r
     //\r
@@ -386,24 +347,22 @@ Returns:
   return ;\r
 }\r
 \r
+\r
+/**\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
+\r
+\r
+**/\r
+// TODO:    MicroSeconds - add argument and description to function comment\r
 STATIC\r
 VOID\r
 DelayIt (\r
   IN NIC_DATA_INSTANCE *AdapterInfo,\r
   UINT16               MicroSeconds\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
-\r
-Returns:\r
-\r
---*/\r
-// TODO:    MicroSeconds - add argument and description to function comment\r
 {\r
   if (AdapterInfo->VersionFlag == 0x30) {\r
     (*AdapterInfo->Delay_30) (MicroSeconds);\r
@@ -412,24 +371,22 @@ Returns:
   }\r
 }\r
 \r
+\r
+/**\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
+\r
+\r
+**/\r
+// TODO:    flag - add argument and description to function comment\r
 STATIC\r
 VOID\r
 BlockIt (\r
   IN NIC_DATA_INSTANCE *AdapterInfo,\r
   UINT32               flag\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
-\r
-Returns:\r
-\r
---*/\r
-// TODO:    flag - add argument and description to function comment\r
 {\r
   if (AdapterInfo->VersionFlag == 0x30) {\r
     (*AdapterInfo->Block_30) (flag);\r
@@ -438,26 +395,20 @@ Returns:
   }\r
 }\r
 \r
-STATIC\r
-UINT8\r
-Load_Base_Regs (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+STATIC\r
+UINT8\r
+Load_Base_Regs (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   //\r
   // we will use the linear (flat) memory model and fill our base registers\r
@@ -488,28 +439,22 @@ Returns:
   return 0;\r
 }\r
 \r
+\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  cmd_ptr                         TODO: add argument description\r
+\r
+  @return TODO: add return values\r
+\r
+**/\r
 STATIC\r
 UINT8\r
 IssueCB (\r
   NIC_DATA_INSTANCE *AdapterInfo,\r
   TxCB              *cmd_ptr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  cmd_ptr     - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   UINT16  status;\r
 \r
@@ -555,26 +500,20 @@ Returns:
   return 0;\r
 }\r
 \r
-STATIC\r
-UINT8\r
-Configure (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+STATIC\r
+UINT8\r
+Configure (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   //\r
   // all command blocks are of TxCB format\r
@@ -632,25 +571,19 @@ Returns:
   return 0;\r
 }\r
 \r
-UINT8\r
-E100bSetupIAAddr (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  AdapterInfo - TODO: add argument description\r
+  @return TODO: add return values\r
 \r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
+**/\r
+UINT8\r
+E100bSetupIAAddr (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   //\r
   // all command blocks are of TxCB format\r
@@ -693,22 +626,21 @@ Returns:
   return 0;\r
 }\r
 \r
+\r
+/**\r
+  Instructs the NIC to stop receiving packets.\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
+\r
+\r
+**/\r
 STATIC\r
 VOID\r
 StopRU (\r
   IN NIC_DATA_INSTANCE *AdapterInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Instructs the NIC to stop receiving packets.\r
-\r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
-Returns:\r
-\r
---*/\r
 {\r
   if (AdapterInfo->Receive_Started) {\r
 \r
@@ -729,23 +661,23 @@ Returns:
   return ;\r
 }\r
 \r
+\r
+/**\r
+  Instructs the NIC to start receiving packets.\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
+\r
+  @retval 0                               Successful\r
+  @retval -1                              Already Started\r
+\r
+**/\r
 STATIC\r
 INT8\r
 StartRU (\r
   NIC_DATA_INSTANCE *AdapterInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Instructs the NIC to start receiving packets.\r
-\r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
-Returns:\r
-  0                               - Successful\r
-  -1                              - Already Started\r
---*/\r
 {\r
 \r
   if (AdapterInfo->Receive_Started) {\r
@@ -769,24 +701,23 @@ Returns:
   return 0;\r
 }\r
 \r
-UINTN\r
-E100bInit (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Configures the chip.  This routine expects the NIC_DATA_INSTANCE structure to be filled in.\r
 \r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
 \r
-Returns:\r
-  0                               - Successful\r
-  PXE_STATCODE_NOT_ENOUGH_MEMORY  - Insufficient length of locked memory\r
-  other                           - Failure initializing chip\r
---*/\r
+  @retval 0                               Successful\r
+  @retval PXE_STATCODE_NOT_ENOUGH_MEMORY  Insufficient length of locked memory\r
+  @retval other                           Failure initializing chip\r
+\r
+**/\r
+UINTN\r
+E100bInit (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   PCI_CONFIG_HEADER *CfgHdr;\r
   UINTN             stat;\r
@@ -865,21 +796,21 @@ Returns:
   return InitializeChip (AdapterInfo);\r
 }\r
 \r
+\r
+/**\r
+  Sets the interrupt state for the NIC.\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
+\r
+  @retval 0                               Successful\r
+\r
+**/\r
 UINT8\r
 E100bSetInterruptState (\r
   IN NIC_DATA_INSTANCE *AdapterInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Sets the interrupt state for the NIC.\r
-\r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
-Returns:\r
-  0                               - Successful\r
---*/\r
 {\r
   //\r
   // don't set receive interrupt if receiver is disabled...\r
@@ -912,6 +843,20 @@ Returns:
 //\r
 // we are not going to disable broadcast for the WOL's sake!\r
 //\r
+\r
+/**\r
+  Instructs the NIC to start receiving packets.\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on.. new_filter\r
+                                              - cpb                             -\r
+                                          cpbsize                         -\r
+\r
+  @retval 0                               Successful\r
+  @retval -1                              Already Started\r
+\r
+**/\r
 UINTN\r
 E100bSetfilter (\r
   NIC_DATA_INSTANCE *AdapterInfo,\r
@@ -919,22 +864,6 @@ E100bSetfilter (
   UINT64            cpb,\r
   UINT32            cpbsize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Instructs the NIC to start receiving packets.\r
-\r
-Arguments:\r
-  AdapterInfo                     - Pointer to the NIC data structure information\r
-                                    which the UNDI driver is layering on..\r
-  new_filter                      -\r
-  cpb                             -\r
-  cpbsize                         -\r
-\r
-Returns:\r
-  0                               - Successful\r
-  -1                              - Already Started\r
---*/\r
 {\r
   PXE_CPB_RECEIVE_FILTERS *mc_list = (PXE_CPB_RECEIVE_FILTERS *) (UINTN)cpb;\r
   UINT16                  cfg_flt;\r
@@ -1074,29 +1003,23 @@ Returns:
   return 0;\r
 }\r
 \r
+\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  cpb                             TODO: add argument description\r
+  @param  opflags                         TODO: add argument description\r
+\r
+  @return TODO: add return values\r
+\r
+**/\r
 UINTN\r
 E100bTransmit (\r
   NIC_DATA_INSTANCE *AdapterInfo,\r
   UINT64            cpb,\r
   UINT16            opflags\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  cpb         - TODO: add argument description\r
-  opflags     - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   PXE_CPB_TRANSMIT_FRAGMENTS  *tx_ptr_f;\r
   PXE_CPB_TRANSMIT            *tx_ptr_1;\r
@@ -1262,29 +1185,23 @@ Returns:
   return 0;\r
 }\r
 \r
+\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  cpb                             TODO: add argument description\r
+  @param  db                              TODO: add argument description\r
+\r
+  @return TODO: add return values\r
+\r
+**/\r
 UINTN\r
 E100bReceive (\r
   NIC_DATA_INSTANCE *AdapterInfo,\r
   UINT64            cpb,\r
   UINT64            db\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  cpb         - TODO: add argument description\r
-  db          - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   PXE_CPB_RECEIVE *rx_cpbptr;\r
   PXE_DB_RECEIVE  *rx_dbptr;\r
@@ -1392,7 +1309,7 @@ Returns:
             // mcast\r
             //\r
 \r
-            pkt_type = PXE_FRAME_TYPE_MULTICAST;\r
+            pkt_type = PXE_FRAME_TYPE_FILTERED_MULTICAST;\r
           } else {\r
             pkt_type = PXE_FRAME_TYPE_PROMISCUOUS;\r
           }\r
@@ -1449,25 +1366,19 @@ FreeRFD:
   return ret_code;\r
 }\r
 \r
-INT16\r
-E100bReadEepromAndStationAddress (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+INT16\r
+E100bReadEepromAndStationAddress (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   INT32   Index;\r
   INT32   Index2;\r
@@ -1524,25 +1435,19 @@ Returns:
 //  3) when one is free, Tail == Head and Freecount == 1\r
 //  4) First non-Free frame is always at Tail->next\r
 //\r
-UINT8\r
-SetupCBlink (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT8\r
+SetupCBlink (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   TxCB  *head_ptr;\r
   TxCB  *tail_ptr;\r
@@ -1590,25 +1495,19 @@ Returns:
   return 0;\r
 }\r
 \r
-TxCB *\r
-GetFreeCB (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+TxCB *\r
+GetFreeCB (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   TxCB  *free_cb_ptr;\r
 \r
@@ -1637,27 +1536,21 @@ Returns:
   return free_cb_ptr;\r
 }\r
 \r
-VOID\r
-SetFreeCB (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN TxCB              *cb_ptr\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  cb_ptr      - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  cb_ptr                          TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+VOID\r
+SetFreeCB (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN TxCB              *cb_ptr\r
+  )\r
 {\r
   //\r
   // here we assume cb are returned in the order they are taken out\r
@@ -1671,25 +1564,19 @@ Returns:
   return ;\r
 }\r
 \r
-UINT16\r
-next (\r
-  IN UINT16 ind\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  ind - TODO: add argument description\r
+  @param  ind                             TODO: add argument description\r
 \r
-Returns:\r
-\r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT16\r
+next (\r
+  IN UINT16 ind\r
+  )\r
 {\r
   UINT16  Tmp;\r
 \r
@@ -1701,25 +1588,19 @@ Returns:
   return Tmp;\r
 }\r
 \r
-UINT16\r
-CheckCBList (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT16\r
+CheckCBList (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   TxCB    *Tmp_ptr;\r
   UINT16  cnt;\r
@@ -1762,25 +1643,19 @@ Returns:
 //               bit in the previous RXFD is cleared.\r
 //               Allocation done during INIT, this is making linked list.\r
 //\r
-UINT8\r
-SetupReceiveQueues (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT8\r
+SetupReceiveQueues (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   RxFD    *rx_ptr;\r
   RxFD    *tail_ptr;\r
@@ -1823,27 +1698,21 @@ Returns:
   return 0;\r
 }\r
 \r
-VOID\r
-Recycle_RFD (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN UINT16            rx_index\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  rx_index    - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  rx_index                        TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+VOID\r
+Recycle_RFD (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN UINT16            rx_index\r
+  )\r
 {\r
   RxFD  *rx_ptr;\r
   RxFD  *tail_ptr;\r
@@ -1956,26 +1825,20 @@ Returns:
   }\r
 }\r
 \r
-STATIC\r
-UINT16\r
-shift_bits_in (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+STATIC\r
+UINT16\r
+shift_bits_in (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT8   Tmp;\r
   INT32   Index;\r
@@ -2008,26 +1871,25 @@ Returns:
   return retval;\r
 }\r
 \r
-STATIC\r
-BOOLEAN\r
-E100bSetEepromLockOut (\r
-  IN NIC_DATA_INSTANCE  *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine sets the EEPROM lockout bit to gain exclusive access to the\r
   eeprom. the access bit is the most significant bit in the General Control\r
   Register 2 in the SCB space.\r
 \r
-Arguments:\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
 \r
-Returns:\r
-  TRUE - if it got the access\r
-  FALSE - if it fails to get the exclusive access\r
+  @retval TRUE                            if it got the access\r
+  @retval FALSE                           if it fails to get the exclusive access\r
 \r
---*/\r
+**/\r
+STATIC\r
+BOOLEAN\r
+E100bSetEepromLockOut (\r
+  IN NIC_DATA_INSTANCE  *AdapterInfo\r
+  )\r
 {\r
   UINTN wait;\r
   UINT8 tmp;\r
@@ -2057,25 +1919,24 @@ Returns:
   return TRUE;\r
 }\r
 \r
-STATIC\r
-VOID\r
-E100bReSetEepromLockOut (\r
-  IN NIC_DATA_INSTANCE  *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   This routine Resets the EEPROM lockout bit to giveup access to the\r
   eeprom. the access bit is the most significant bit in the General Control\r
   Register 2 in the SCB space.\r
 \r
-Arguments:\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
 \r
-Returns:\r
- None\r
+  @return None\r
 \r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+E100bReSetEepromLockOut (\r
+  IN NIC_DATA_INSTANCE  *AdapterInfo\r
+  )\r
 {\r
   UINT8 tmp;\r
 \r
@@ -2090,26 +1951,25 @@ Returns:
   }\r
 }\r
 \r
+\r
+/**\r
+  Using the NIC data structure information, read the EEPROM to get a Word of data for the MAC address.\r
+\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
+  @param  Location                        Word offset into the MAC address to read.\r
+  @param  AddrLen                         Number of bits of address length.\r
+\r
+  @retval RetVal                          The word read from the EEPROM.\r
+\r
+**/\r
 UINT16\r
 E100bReadEeprom (\r
   IN NIC_DATA_INSTANCE  *AdapterInfo,\r
   IN INT32              Location,\r
   IN UINT8              AddrLen\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Using the NIC data structure information, read the EEPROM to get a Word of data for the MAC address.\r
-\r
-Arguments:\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
-  Location          - Word offset into the MAC address to read.\r
-  AddrLen           - Number of bits of address length.\r
-\r
-Returns:\r
-  RetVal            - The word read from the EEPROM.\r
-\r
---*/\r
 {\r
   UINT16  RetVal;\r
   UINT8   Tmp;\r
@@ -2174,23 +2034,22 @@ Returns:
   return RetVal;\r
 }\r
 \r
-UINT8\r
-E100bGetEepromAddrLen (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
+/**\r
   Using the NIC data structure information, read the EEPROM to determine how many bits of address length\r
   this EEPROM is in Words.\r
 \r
-Arguments:\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  AdapterInfo                     Pointer to the NIC data structure\r
+                                          information which the UNDI driver is\r
+                                          layering on..\r
 \r
-Returns:\r
-  RetVal            - The word read from the EEPROM.\r
+  @retval RetVal                          The word read from the EEPROM.\r
 \r
---*/\r
+**/\r
+UINT8\r
+E100bGetEepromAddrLen (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT8   Tmp;\r
   UINT8   AddrLen;\r
@@ -2286,29 +2145,23 @@ Returns:
   return AddrLen;\r
 }\r
 \r
+\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  DBaddr                          TODO: add argument description\r
+  @param  DBsize                          TODO: add argument description\r
+\r
+  @return TODO: add return values\r
+\r
+**/\r
 UINTN\r
 E100bStatistics (\r
   NIC_DATA_INSTANCE *AdapterInfo,\r
   UINT64            DBaddr,\r
   UINT16            DBsize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  DBaddr      - TODO: add argument description\r
-  DBsize      - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   PXE_DB_STATISTICS db;\r
   //\r
@@ -2426,27 +2279,21 @@ Returns:
   return PXE_STATCODE_SUCCESS;\r
 }\r
 \r
-UINTN\r
-E100bReset (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo,\r
-  IN INT32             OpFlags\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-  OpFlags     - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
+  @param  OpFlags                         TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINTN\r
+E100bReset (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo,\r
+  IN INT32             OpFlags\r
+  )\r
 {\r
 \r
   UINT16  save_filter;\r
@@ -2497,25 +2344,19 @@ Returns:
   return 0;\r
 }\r
 \r
-UINTN\r
-E100bShutdown (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINTN\r
+E100bShutdown (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   //\r
   // disable the interrupts\r
@@ -2546,6 +2387,22 @@ Returns:
   return 0;\r
 }\r
 \r
+\r
+/**\r
+  This routine will write a value to the specified MII register\r
+  of an external MDI compliant device (e.g. PHY 100).  The command will\r
+  execute in polled mode.\r
+\r
+  @param  AdapterInfo                     pointer to the structure that contains\r
+                                          the NIC's context.\r
+  @param  RegAddress                      The MII register that we are writing to\r
+  @param  PhyAddress                      The MDI address of the Phy component.\r
+  @param  DataValue                       The value that we are writing to the MII\r
+                                          register.\r
+\r
+  @return nothing\r
+\r
+**/\r
 VOID\r
 MdiWrite (\r
   IN NIC_DATA_INSTANCE *AdapterInfo,\r
@@ -2553,22 +2410,6 @@ MdiWrite (
   IN UINT8             PhyAddress,\r
   IN UINT16            DataValue\r
   )\r
-/*++\r
-\r
-Routine Description:\r
- This routine will write a value to the specified MII register\r
- of an external MDI compliant device (e.g. PHY 100).  The command will\r
- execute in polled mode.\r
-\r
-Arguments:\r
-  AdapterInfo - pointer to the structure that contains the NIC's context.\r
-  RegAddress - The MII register that we are writing to\r
-  PhyAddress - The MDI address of the Phy component.\r
-  DataValue - The value that we are writing to the MII register.\r
-\r
-Returns:\r
- nothing\r
---*/\r
 {\r
   UINT32  WriteCommand;\r
 \r
@@ -2595,6 +2436,21 @@ Returns:
   }\r
 }\r
 \r
+\r
+/**\r
+  This routine will read a value from the specified MII register\r
+  of an external MDI compliant device (e.g. PHY 100), and return\r
+  it to the calling routine.  The command will execute in polled mode.\r
+\r
+  @param  AdapterInfo                     pointer to the structure that contains\r
+                                          the NIC's context.\r
+  @param  RegAddress                      The MII register that we are reading from\r
+  @param  PhyAddress                      The MDI address of the Phy component.\r
+  @param  DataValue                       pointer to the value that we read from\r
+                                          the MII register.\r
+\r
+\r
+**/\r
 VOID\r
 MdiRead (\r
   IN NIC_DATA_INSTANCE *AdapterInfo,\r
@@ -2602,22 +2458,6 @@ MdiRead (
   IN UINT8             PhyAddress,\r
   IN OUT UINT16        *DataValue\r
   )\r
-/*++\r
-\r
-Routine Description:\r
- This routine will read a value from the specified MII register\r
- of an external MDI compliant device (e.g. PHY 100), and return\r
- it to the calling routine.  The command will execute in polled mode.\r
-\r
-Arguments:\r
- AdapterInfo - pointer to the structure that contains the NIC's context.\r
- RegAddress - The MII register that we are reading from\r
- PhyAddress - The MDI address of the Phy component.\r
- DataValue - pointer to the value that we read from the MII register.\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   UINT32  ReadCommand;\r
 \r
@@ -2647,22 +2487,20 @@ Returns:
   *DataValue = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBCtrlMDI);\r
 }\r
 \r
-VOID\r
-PhyReset (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
 \r
-Routine Description:\r
- This routine will reset the PHY that the adapter is currently\r
- configured to use.\r
+/**\r
 This routine will reset the PHY that the adapter is currently\r
 configured to use.\r
 \r
-Arguments:\r
-  AdapterInfo - pointer to the structure that contains the NIC's context.\r
+  @param  AdapterInfo                     pointer to the structure that contains\r
+                                          the NIC's context.\r
 \r
-Returns:\r
 \r
---*/\r
+**/\r
+VOID\r
+PhyReset (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT16  MdiControlReg;\r
 \r
@@ -2683,53 +2521,49 @@ Returns:
   return ;\r
 }\r
 \r
+\r
+/**\r
+  This routine will detect what phy we are using, set the line\r
+  speed, FDX or HDX, and configure the phy if necessary.\r
+  The following combinations are supported:\r
+  - TX or T4 PHY alone at PHY address 1\r
+  - T4 or TX PHY at address 1 and MII PHY at address 0\r
+  - 82503 alone (10Base-T mode, no full duplex support)\r
+  - 82503 and MII PHY (TX or T4) at address 0\r
+  The sequence / priority of detection is as follows:\r
+  - PHY 1 with cable termination\r
+  - PHY 0 with cable termination\r
+  - PHY 1 (if found) without cable termination\r
+  - 503 interface\r
+  Additionally auto-negotiation capable (NWAY) and parallel\r
+  detection PHYs are supported. The flow-chart is described in\r
+  the 82557 software writer's manual.\r
+  NOTE:  1.  All PHY MDI registers are read in polled mode.\r
+  2.  The routines assume that the 82557 has been RESET and we have\r
+  obtained the virtual memory address of the CSR.\r
+  3.  PhyDetect will not RESET the PHY.\r
+  4.  If FORCEFDX is set, SPEED should also be set. The driver will\r
+  check the values for inconsistency with the detected PHY\r
+  technology.\r
+  5.  PHY 1 (the PHY on the adapter) may have an address in the range\r
+  1 through 31 inclusive. The driver will accept addresses in\r
+  this range.\r
+  6.  Driver ignores FORCEFDX and SPEED overrides if a 503 interface\r
+  is detected.\r
+\r
+  @param  AdapterInfo                     pointer to the structure that contains\r
+                                          the NIC's context.\r
+\r
+  @retval TRUE                            If a Phy was detected, and configured\r
+                                          correctly.\r
+  @retval FALSE                           If a valid phy could not be detected and\r
+                                          configured.\r
+\r
+**/\r
 BOOLEAN\r
 PhyDetect (\r
   NIC_DATA_INSTANCE *AdapterInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
- This routine will detect what phy we are using, set the line\r
-              speed, FDX or HDX, and configure the phy if necessary.\r
-\r
-              The following combinations are supported:\r
-              - TX or T4 PHY alone at PHY address 1\r
-              - T4 or TX PHY at address 1 and MII PHY at address 0\r
-              - 82503 alone (10Base-T mode, no full duplex support)\r
-              - 82503 and MII PHY (TX or T4) at address 0\r
-\r
-              The sequence / priority of detection is as follows:\r
-              - PHY 1 with cable termination\r
-              - PHY 0 with cable termination\r
-              - PHY 1 (if found) without cable termination\r
-              - 503 interface\r
-\r
-              Additionally auto-negotiation capable (NWAY) and parallel\r
-              detection PHYs are supported. The flow-chart is described in\r
-              the 82557 software writer's manual.\r
-\r
-   NOTE:  1.  All PHY MDI registers are read in polled mode.\r
-          2.  The routines assume that the 82557 has been RESET and we have\r
-              obtained the virtual memory address of the CSR.\r
-          3.  PhyDetect will not RESET the PHY.\r
-          4.  If FORCEFDX is set, SPEED should also be set. The driver will\r
-              check the values for inconsistency with the detected PHY\r
-              technology.\r
-          5.  PHY 1 (the PHY on the adapter) may have an address in the range\r
-              1 through 31 inclusive. The driver will accept addresses in\r
-              this range.\r
-          6.  Driver ignores FORCEFDX and SPEED overrides if a 503 interface\r
-              is detected.\r
-\r
-Arguments:\r
-  AdapterInfo - pointer to the structure that contains the NIC's context.\r
-\r
-Returns:\r
-  TRUE - If a Phy was detected, and configured correctly.\r
-  FALSE - If a valid phy could not be detected and configured.\r
-\r
---*/\r
 {\r
   UINT16  *eedata;\r
   UINT16  MdiControlReg;\r
@@ -3005,35 +2839,33 @@ Returns:
   }\r
 }\r
 \r
+\r
+/**\r
+  This routine will setup phy 1 or phy 0 so that it is configured\r
+  to match a speed and duplex over-ride option.  If speed or\r
+  duplex mode is not explicitly specified in the registry, the\r
+  driver will skip the speed and duplex over-ride code, and\r
+  assume the adapter is automatically setting the line speed, and\r
+  the duplex mode.  At the end of this routine, any truly Phy\r
+  specific code will be executed (each Phy has its own quirks,\r
+  and some require that certain special bits are set).\r
+  NOTE:  The driver assumes that SPEED and FORCEFDX are specified at the\r
+  same time. If FORCEDPX is set without speed being set, the driver\r
+  will encouter a fatal error and log a message into the event viewer.\r
+\r
+  @param  AdapterInfo                     pointer to the structure that contains\r
+                                          the NIC's context.\r
+\r
+  @retval TRUE                            If the phy could be configured correctly\r
+  @retval FALSE                           If the phy couldn't be configured\r
+                                          correctly, because an unsupported\r
+                                          over-ride option was used\r
+\r
+**/\r
 BOOLEAN\r
 SetupPhy (\r
   IN NIC_DATA_INSTANCE *AdapterInfo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
- This routine will setup phy 1 or phy 0 so that it is configured\r
- to match a speed and duplex over-ride option.  If speed or\r
- duplex mode is not explicitly specified in the registry, the\r
- driver will skip the speed and duplex over-ride code, and\r
- assume the adapter is automatically setting the line speed, and\r
- the duplex mode.  At the end of this routine, any truly Phy\r
- specific code will be executed (each Phy has its own quirks,\r
- and some require that certain special bits are set).\r
-\r
- NOTE:  The driver assumes that SPEED and FORCEFDX are specified at the\r
-        same time. If FORCEDPX is set without speed being set, the driver\r
-        will encouter a fatal error and log a message into the event viewer.\r
-\r
-Arguments:\r
- AdapterInfo - pointer to the structure that contains the NIC's context.\r
-\r
-Returns:\r
- TRUE - If the phy could be configured correctly\r
- FALSE - If the phy couldn't be configured correctly, because an\r
-         unsupported over-ride option was used\r
-\r
---*/\r
 {\r
   UINT16  MdiControlReg;\r
   UINT16  MdiStatusReg;\r
@@ -3229,24 +3061,23 @@ Returns:
   return (TRUE);\r
 }\r
 \r
+\r
+/**\r
+  This routine will figure out what line speed and duplex mode\r
+  the PHY is currently using.\r
+\r
+  @param  AdapterInfo                     pointer to the structure that contains\r
+                                          the NIC's context.\r
+  @param  PhyId                           The ID of the PHY in question.\r
+\r
+  @return NOTHING\r
+\r
+**/\r
 VOID\r
 FindPhySpeedAndDpx (\r
   IN NIC_DATA_INSTANCE *AdapterInfo,\r
   IN UINT32            PhyId\r
   )\r
-/*++\r
-\r
-Routine Description:\r
- This routine will figure out what line speed and duplex mode\r
- the PHY is currently using.\r
-\r
-Arguments:\r
- AdapterInfo - pointer to the structure that contains the NIC's context.\r
- PhyId - The ID of the PHY in question.\r
-\r
-Returns:\r
-  NOTHING\r
---*/\r
 {\r
   UINT16  MdiStatusReg;\r
   UINT16  MdiMiscReg;\r
@@ -3452,25 +3283,19 @@ Returns:
   }\r
 }\r
 \r
-VOID\r
-XmitWaitForCompletion (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+VOID\r
+XmitWaitForCompletion (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   TxCB  *TxPtr;\r
 \r
@@ -3490,27 +3315,21 @@ Returns:
   }\r
 }\r
 \r
-INT8\r
-CommandWaitForCompletion (\r
-  TxCB              *cmd_ptr,\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  cmd_ptr     - TODO: add argument description\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  cmd_ptr                         TODO: add argument description\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+INT8\r
+CommandWaitForCompletion (\r
+  TxCB              *cmd_ptr,\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   INT16 wait;\r
   wait = 5000;\r
@@ -3525,26 +3344,20 @@ Returns:
   return 0;\r
 }\r
 \r
-STATIC\r
-INT8\r
-SoftwareReset (\r
-  NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+STATIC\r
+INT8\r
+SoftwareReset (\r
+  NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT8   tco_stat;\r
   UINT16  wait;\r
@@ -3632,25 +3445,19 @@ Returns:
   return 0;\r
 }\r
 \r
-UINT8\r
-SelectiveReset (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT8\r
+SelectiveReset (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT16  wait;\r
   UINT32  stat;\r
@@ -3686,25 +3493,19 @@ Returns:
   return 0;\r
 }\r
 \r
-UINT16\r
-InitializeChip (\r
-  IN NIC_DATA_INSTANCE *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  AdapterInfo - TODO: add argument description\r
-\r
-Returns:\r
+  @param  AdapterInfo                     TODO: add argument description\r
 \r
-  TODO: add return values\r
+  @return TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT16\r
+InitializeChip (\r
+  IN NIC_DATA_INSTANCE *AdapterInfo\r
+  )\r
 {\r
   UINT16  ret_val;\r
   if (SoftwareReset (AdapterInfo) != 0) {\r
index d1107ddba7f9a11bc0f19b227fcec74d8488404e..957e92b604929197b3070f35b665fa05c28da3f6 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Definitions for network adapter card.\r
 \r
 Copyright (c) 2006 - 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,16 +10,8 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
+**/\r
 \r
-  E100B.H\r
-\r
-Abstract:\r
-\r
-\r
-Revision History\r
-\r
---*/\r
 // pci config offsets:\r
 \r
 #define RX_BUFFER_COUNT 32\r
index 413ef32a7a8b5f76eb529da8b1636a9c7c6bc8da..28ce11126995e8d3cbc256d1cbe8694a1c4c8015 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Initialization functions for EFI UNDI32 driver.\r
 \r
 Copyright (c) 2006 - 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -9,20 +10,9 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-    init.c\r
-\r
-Abstract:\r
-\r
-    Initialization functions for EFI UNDI32 driver\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #include "Undi32.h"\r
-#include <Library/BaseLib.h>\r
 //\r
 // Global Variables\r
 //\r
@@ -31,29 +21,23 @@ PXE_SW_UNDI             *pxe_31 = NULL;  // 3.1 entry
 UNDI32_DEV              *UNDI32DeviceList[MAX_NIC_INTERFACES];\r
 NII_TABLE               *UndiDataPointer = NULL;\r
 \r
-VOID\r
-EFIAPI\r
-UndiNotifyVirtual (\r
-  EFI_EVENT Event,\r
-  VOID      *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   When address mapping changes to virtual this should make the appropriate\r
   address conversions.\r
 \r
-Arguments:\r
-\r
   (Standard Event handler)\r
 \r
-Returns:\r
+  @return None\r
 \r
-  None\r
-\r
---*/\r
+**/\r
 // TODO:    Context - add argument and description to function comment\r
+VOID\r
+EFIAPI\r
+UndiNotifyVirtual (\r
+  EFI_EVENT Event,\r
+  VOID      *Context\r
+  )\r
 {\r
   UINT16  Index;\r
   VOID    *Pxe31Pointer;\r
@@ -62,7 +46,7 @@ Returns:
     Pxe31Pointer = (VOID *) pxe_31;\r
 \r
     EfiConvertPointer (\r
-      EFI_OPTIONAL_POINTER,\r
+      EFI_OPTIONAL_PTR,\r
       (VOID **) &Pxe31Pointer\r
       );\r
 \r
@@ -72,13 +56,13 @@ Returns:
     for (Index = 0; Index < pxe_31->IFcnt; Index++) {\r
       UNDI32DeviceList[Index]->NIIProtocol_31.ID = (UINT64) (UINTN) Pxe31Pointer;\r
       EfiConvertPointer (\r
-        EFI_OPTIONAL_POINTER,\r
+        EFI_OPTIONAL_PTR,\r
         (VOID **) &(UNDI32DeviceList[Index])\r
         );\r
     }\r
 \r
     EfiConvertPointer (\r
-      EFI_OPTIONAL_POINTER,\r
+      EFI_OPTIONAL_PTR,\r
       (VOID **) &(pxe_31->EntryPoint)\r
       );\r
     pxe_31 = Pxe31Pointer;\r
@@ -86,35 +70,29 @@ Returns:
 \r
   for (Index = 0; Index <= PXE_OPCODE_LAST_VALID; Index++) {\r
     EfiConvertPointer (\r
-      EFI_OPTIONAL_POINTER,\r
+      EFI_OPTIONAL_PTR,\r
       (VOID **) &api_table[Index].api_ptr\r
       );\r
   }\r
 }\r
 \r
-VOID\r
-EFIAPI\r
-UndiNotifyExitBs (\r
-  EFI_EVENT Event,\r
-  VOID      *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   When EFI is shuting down the boot services, we need to install a\r
   configuration table for UNDI to work at runtime!\r
 \r
-Arguments:\r
-\r
   (Standard Event handler)\r
 \r
-Returns:\r
+  @return None\r
 \r
-  None\r
-\r
---*/\r
+**/\r
 // TODO:    Context - add argument and description to function comment\r
+VOID\r
+EFIAPI\r
+UndiNotifyExitBs (\r
+  EFI_EVENT Event,\r
+  VOID      *Context\r
+  )\r
 {\r
   InstallConfigTable ();\r
 }\r
@@ -131,38 +109,29 @@ EFI_DRIVER_BINDING_PROTOCOL  gUndiDriverBinding = {
 };\r
 \r
 \r
-EFI_STATUS\r
-EFIAPI\r
-UndiDriverSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
-  IN EFI_HANDLE                     Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Test to see if this driver supports ControllerHandle. Any ControllerHandle\r
   than contains a  DevicePath, PciIo protocol, Class code of 2, Vendor ID of 0x8086,\r
   and DeviceId of (D100_DEVICE_ID || D102_DEVICE_ID || ICH3_DEVICE_ID_1 ||\r
   ICH3_DEVICE_ID_2 || ICH3_DEVICE_ID_3 || ICH3_DEVICE_ID_4 || ICH3_DEVICE_ID_5 ||\r
   ICH3_DEVICE_ID_6 || ICH3_DEVICE_ID_7 || ICH3_DEVICE_ID_8) can be supported.\r
 \r
-Arguments:\r
-\r
-  This                - Protocol instance pointer.\r
-\r
-  Controller          - Handle of device to test.\r
+  @param  This                 Protocol instance pointer.\r
+  @param  Controller           Handle of device to test.\r
+  @param  RemainingDevicePath  Not used.\r
 \r
-  RemainingDevicePath - Not used.\r
+  @retval EFI_SUCCESS          This driver supports this device.\r
+  @retval other                This driver does not support this device.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS         - This driver supports this device.\r
-\r
-  other               - This driver does not support this device.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UndiDriverSupported (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
+  IN EFI_HANDLE                     Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
+  )\r
 {\r
   EFI_STATUS          Status;\r
   EFI_PCI_IO_PROTOCOL *PciIo;\r
@@ -246,37 +215,28 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-UndiDriverStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
-  IN EFI_HANDLE                     Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Start this driver on Controller by opening PciIo and DevicePath protocol.\r
   Initialize PXE structures, create a copy of the Controller Device Path with the\r
   NIC's MAC address appended to it, install the NetworkInterfaceIdentifier protocol\r
   on the newly created Device Path.\r
 \r
-Arguments:\r
-\r
-  This                - Protocol instance pointer.\r
-\r
-  Controller          - Handle of device to work with.\r
+  @param  This                 Protocol instance pointer.\r
+  @param  Controller           Handle of device to work with.\r
+  @param  RemainingDevicePath  Not used, always produce all possible children.\r
 \r
-  RemainingDevicePath - Not used, always produce all possible children.\r
+  @retval EFI_SUCCESS          This driver is added to Controller.\r
+  @retval other                This driver does not support this device.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS         - This driver is added to Controller.\r
-\r
-  other               - This driver does not support this device.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UndiDriverStart (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
+  IN EFI_HANDLE                     Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
+  )\r
 {\r
   EFI_STATUS                Status;\r
   EFI_DEVICE_PATH_PROTOCOL  *UndiDevicePath;\r
@@ -506,7 +466,7 @@ Returns:
   // if the table exists, free it and alloc again, or alloc it directly\r
   //\r
   if (UndiDataPointer != NULL) {\r
-       Status = gBS->FreePool(UndiDataPointer);\r
+    Status = gBS->FreePool(UndiDataPointer);\r
   }\r
   if (EFI_ERROR (Status)) {\r
     goto UndiErrorDeleteDevicePath;\r
@@ -586,6 +546,21 @@ UndiError:
   return Status;\r
 }\r
 \r
+\r
+/**\r
+  Stop this driver on Controller by removing NetworkInterfaceIdentifier protocol and\r
+  closing the DevicePath and PciIo protocols on Controller.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  Controller           Handle of device to stop driver on.\r
+  @param  NumberOfChildren     How many children need to be stopped.\r
+  @param  ChildHandleBuffer    Not used.\r
+\r
+  @retval EFI_SUCCESS          This driver is removed Controller.\r
+  @retval other                This driver was not removed from this device.\r
+\r
+**/\r
+// TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 EFI_STATUS\r
 EFIAPI\r
 UndiDriverStop (\r
@@ -594,24 +569,6 @@ UndiDriverStop (
   IN  UINTN                          NumberOfChildren,\r
   IN  EFI_HANDLE                     *ChildHandleBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Stop this driver on Controller by removing NetworkInterfaceIdentifier protocol and\r
-  closing the DevicePath and PciIo protocols on Controller.\r
-\r
-Arguments:\r
-  This              - Protocol instance pointer.\r
-  Controller        - Handle of device to stop driver on.\r
-  NumberOfChildren  - How many children need to be stopped.\r
-  ChildHandleBuffer - Not used.\r
-\r
-Returns:\r
-  EFI_SUCCESS       - This driver is removed Controller.\r
-  other             - This driver was not removed from this device.\r
-\r
---*/\r
-// TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
   EFI_STATUS                                Status;\r
   BOOLEAN                                   AllChildrenStopped;\r
@@ -717,34 +674,44 @@ Returns:
 \r
 }\r
 \r
-VOID\r
-TmpDelay (\r
-  IN UINT64 UnqId,\r
-  IN UINTN  MicroSeconds\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Use the EFI boot services to produce a pause. This is also the routine which\r
   gets replaced during RunTime by the O/S in the NIC_DATA_INSTANCE so it can\r
   do it's own pause.\r
 \r
-Arguments:\r
-\r
-  UnqId             - Runtime O/S routine might use this, this temp routine does not use it\r
-\r
-  MicroSeconds      - Determines the length of pause.\r
+  @param  UnqId                Runtime O/S routine might use this, this temp\r
+                               routine does not use it\r
+  @param  MicroSeconds         Determines the length of pause.\r
 \r
-Returns:\r
-\r
-  none\r
+  @return none\r
 \r
---*/\r
+**/\r
+VOID\r
+TmpDelay (\r
+  IN UINT64 UnqId,\r
+  IN UINTN  MicroSeconds\r
+  )\r
 {\r
   gBS->Stall ((UINT32) MicroSeconds);\r
 }\r
 \r
+\r
+/**\r
+  Use the PCI IO abstraction to issue memory or I/O reads and writes.  This is also the routine which\r
+  gets replaced during RunTime by the O/S in the NIC_DATA_INSTANCE so it can do it's own I/O abstractions.\r
+\r
+  @param  UnqId                Runtime O/S routine may use this field, this temp\r
+                               routine does not.\r
+  @param  ReadWrite            Determine if it is an I/O or Memory Read/Write\r
+                               Operation.\r
+  @param  Len                  Determines the width of the data operation.\r
+  @param  Port                 What port to Read/Write from.\r
+  @param  BuffAddr             Address to read to or write from.\r
+\r
+  @return none\r
+\r
+**/\r
 VOID\r
 TmpMemIo (\r
   IN UINT64 UnqId,\r
@@ -753,30 +720,6 @@ TmpMemIo (
   IN UINT64 Port,\r
   IN UINT64 BuffAddr\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Use the PCI IO abstraction to issue memory or I/O reads and writes.  This is also the routine which\r
-  gets replaced during RunTime by the O/S in the NIC_DATA_INSTANCE so it can do it's own I/O abstractions.\r
-\r
-Arguments:\r
-\r
-  UnqId             - Runtime O/S routine may use this field, this temp routine does not.\r
-\r
-  ReadWrite         - Determine if it is an I/O or Memory Read/Write Operation.\r
-\r
-  Len               - Determines the width of the data operation.\r
-\r
-  Port              - What port to Read/Write from.\r
-\r
-  BuffAddr          - Address to read to or write from.\r
-\r
-Returns:\r
-\r
-  none\r
-\r
---*/\r
 {\r
   EFI_PCI_IO_PROTOCOL_WIDTH Width;\r
   NIC_DATA_INSTANCE         *AdapterInfo;\r
@@ -846,35 +789,31 @@ Returns:
   return ;\r
 }\r
 \r
-EFI_STATUS\r
-AppendMac2DevPath (\r
-  IN OUT  EFI_DEVICE_PATH_PROTOCOL **DevPtr,\r
-  IN      EFI_DEVICE_PATH_PROTOCOL *BaseDevPtr,\r
-  IN      NIC_DATA_INSTANCE        *AdapterInfo\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Using the NIC data structure information, read the EEPROM to get the MAC address and then allocate space\r
   for a new devicepath (**DevPtr) which will contain the original device path the NIC was found on (*BaseDevPtr)\r
   and an added MAC node.\r
 \r
-Arguments:\r
-\r
-  DevPtr            - Pointer which will point to the newly created device path with the MAC node attached.\r
-\r
-  BaseDevPtr        - Pointer to the device path which the UNDI device driver is latching on to.\r
-\r
-  AdapterInfo       - Pointer to the NIC data structure information which the UNDI driver is layering on..\r
+  @param  DevPtr               Pointer which will point to the newly created device\r
+                               path with the MAC node attached.\r
+  @param  BaseDevPtr           Pointer to the device path which the UNDI device\r
+                               driver is latching on to.\r
+  @param  AdapterInfo          Pointer to the NIC data structure information which\r
+                               the UNDI driver is layering on..\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS          A MAC address was successfully appended to the Base\r
+                               Device Path.\r
+  @retval other                Not enough resources available to create new Device\r
+                               Path node.\r
 \r
-  EFI_SUCCESS       - A MAC address was successfully appended to the Base Device Path.\r
-\r
-  other             - Not enough resources available to create new Device Path node.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+AppendMac2DevPath (\r
+  IN OUT  EFI_DEVICE_PATH_PROTOCOL **DevPtr,\r
+  IN      EFI_DEVICE_PATH_PROTOCOL *BaseDevPtr,\r
+  IN      NIC_DATA_INSTANCE        *AdapterInfo\r
+  )\r
 {\r
   EFI_MAC_ADDRESS           MACAddress;\r
   PCI_CONFIG_HEADER         *CfgHdr;\r
@@ -986,28 +925,23 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-InstallConfigTable (\r
-  IN VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
 \r
+/**\r
   Install a GUID/Pointer pair into the system's configuration table.\r
 \r
-Arguments:\r
-\r
   none\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS          Install a GUID/Pointer pair into the system's\r
+                               configuration table.\r
+  @retval other                Did not successfully install the GUID/Pointer pair\r
+                               into the configuration table.\r
 \r
-  EFI_SUCCESS       - Install a GUID/Pointer pair into the system's configuration table.\r
-\r
-  other             - Did not successfully install the GUID/Pointer pair into the configuration table.\r
-\r
---*/\r
+**/\r
 // TODO:    VOID - add argument and description to function comment\r
+EFI_STATUS\r
+InstallConfigTable (\r
+  IN VOID\r
+  )\r
 {\r
   EFI_STATUS              Status;\r
   EFI_CONFIGURATION_TABLE *CfgPtr;\r
@@ -1020,7 +954,7 @@ Returns:
   }\r
 \r
   if(UndiDataPointer == NULL) {\r
-       return EFI_SUCCESS;\r
+    return EFI_SUCCESS;\r
   }\r
 \r
   UndiData = (NII_TABLE *)UndiDataPointer;\r
@@ -1080,14 +1014,6 @@ Returns:
 \r
 /**\r
 \r
-  Install driver binding protocol of UNDI.\r
-\r
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.\r
-  @param[in] SystemTable    A pointer to the EFI System Table.\r
-\r
-  @retval EFI_SUCCESS       The entry point is executed successfully.\r
-  @retval other             Some error occurs when executing this entry point.\r
-\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 32f80fa8f2742411d2c9e8ddb6a60d3591a55f8c..43994c712108688d6e388d3bef9714a81bc6c5c8 100644 (file)
@@ -1,5 +1,5 @@
-\r
-/*++\r
+/** @file\r
+  EFI internal structures for the EFI UNDI driver.\r
 \r
 Copyright (c) 2006 - 2007, Intel Corporation.\r
 All rights reserved. This program and the accompanying materials\r
@@ -10,19 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-    undi32.h\r
-\r
-Abstract:\r
-\r
-    EFI internal structures for the EFI UNDI driver\r
-\r
-\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _UNDI_32_H_\r
 #define _UNDI_32_H_\r