]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1). Fix the debug level for DEBUG macro
authorniry <niry@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 29 Dec 2008 01:16:13 +0000 (01:16 +0000)
committerniry <niry@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 29 Dec 2008 01:16:13 +0000 (01:16 +0000)
2). Uniform the function description comments

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7143 6f19259b-4bc3-4df7-8a09-765794883524

19 files changed:
MdeModulePkg/Universal/Network/SnpDxe/Callback.c
MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c
MdeModulePkg/Universal/Network/SnpDxe/Get_status.c
MdeModulePkg/Universal/Network/SnpDxe/Initialize.c
MdeModulePkg/Universal/Network/SnpDxe/Mcast_ip_to_mac.c
MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c
MdeModulePkg/Universal/Network/SnpDxe/Receive.c
MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c
MdeModulePkg/Universal/Network/SnpDxe/Reset.c
MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c
MdeModulePkg/Universal/Network/SnpDxe/Snp.c
MdeModulePkg/Universal/Network/SnpDxe/Snp.h
MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
MdeModulePkg/Universal/Network/SnpDxe/Start.c
MdeModulePkg/Universal/Network/SnpDxe/Station_address.c
MdeModulePkg/Universal/Network/SnpDxe/Statistics.c
MdeModulePkg/Universal/Network/SnpDxe/Stop.c
MdeModulePkg/Universal/Network/SnpDxe/Transmit.c
MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c

index c4789ba11dc81be576666a40eb7e1bca2e180f9e..fc018265c792551f0d18d525634f8126c9701757 100644 (file)
@@ -30,20 +30,22 @@ EFI_LOCK             mLock;
 //\r
 extern EFI_PCI_IO_PROTOCOL  *mPciIo;\r
 \r
 //\r
 extern EFI_PCI_IO_PROTOCOL  *mPciIo;\r
 \r
-/**\r
-  This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine with a virtual or CPU address that SNP provided to \r
-  convert it to a physical or device address. Since EFI uses the identical \r
-  mapping, this routine returns the physical address same as the virtual address\r
-  for most of the addresses. an address above 4GB cannot generally be used as a \r
-  device address, it needs to be mapped to a lower physical address. This \r
-  routine does not call the map routine itself, but it assumes that the mapping\r
-  was done at the time of providing the address to UNDI. This routine just \r
-  looks up the address in a map table (which is the v2p structure chain). \r
+/** \r
+  Convert a virtual or CPU address provided by SNP to a physical or device \r
+  address. \r
+\r
+  This is a callback routine supplied to UNDI at undi_start time. Since EFI uses\r
+  the identical mapping, this routine returns the physical address same as the \r
+  virtual address for most of the addresses. an address above 4GB cannot \r
+  generally be used as a device address, it needs to be mapped to a lower \r
+  physical address. This routine does not call the map routine itself, but it \r
+  assumes that the mapping was done at the time of providing the address to \r
+  UNDI. This routine just looks up the address in a map table (which is the v2p \r
+  structure chain). \r
   \r
   \r
-  @param  CpuAddr        virtual address of a buffer.\r
-  @param  DeviceAddrPtr  pointer to the physical address.\r
-                         The DeviceAddrPtr will contain 0 in case of any error.\r
+  @param  CpuAddr        Virtual address.\r
+  @param  DeviceAddrPtr  Pointer to the physical address, or 0 in case of any \r
+                         error.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -59,7 +61,7 @@ SnpUndi32CallbackV2p30 (
   // EFI uses identical mapping\r
   //\r
   if ((CpuAddr == 0) || (DeviceAddrPtr == 0)) {\r
   // EFI uses identical mapping\r
   //\r
   if ((CpuAddr == 0) || (DeviceAddrPtr == 0)) {\r
-    DEBUG ((EFI_D_NET, "\nv2p: Null virtual address or physical pointer.\n"));\r
+    DEBUG ((EFI_D_INFO | EFI_D_NET, "\nv2p: Null virtual address or physical pointer.\n"));\r
     return ;\r
   }\r
 \r
     return ;\r
   }\r
 \r
@@ -80,12 +82,12 @@ SnpUndi32CallbackV2p30 (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Acquire or release a lock of an exclusive access to a critical section of the\r
+  code/data. \r
+\r
   This is a callback routine supplied to UNDI at undi_start time.\r
   This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine when it wants to have exclusive access to a critical\r
-  section of the code/data.\r
 \r
 \r
-  @param Enable   non-zero indicates acquire\r
-                  zero indicates release\r
+  @param Enable   Non-zero indicates acquire; Zero indicates release.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -110,11 +112,11 @@ SnpUndi32CallbackBlock30 (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Delay MicroSeconds of micro seconds.\r
+   \r
   This is a callback routine supplied to UNDI at undi_start time.\r
   This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine with the number of micro seconds when it wants to\r
-  pause.\r
 \r
 \r
-  @param MicroSeconds  number of micro seconds to pause, ususlly multiple of 10.\r
+  @param MicroSeconds  Number of micro seconds to pause, ususlly multiple of 10.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -128,21 +130,22 @@ SnpUndi32CallbackDelay30 (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  This is a callback routine supplied to UNDI at undi_start time.\r
-  This is the IO routine for UNDI. This is not currently being used by UNDI3.0\r
-  because Undi3.0 uses io/mem offsets relative to the beginning of the device\r
-  io/mem address and so it needs to use the PCI_IO_FUNCTION that abstracts the\r
-  start of the device's io/mem addresses. Since SNP cannot retrive the context\r
-  of the undi3.0 interface it cannot use the PCI_IO_FUNCTION that specific for\r
-  that NIC and uses one global IO functions structure, this does not work.\r
-  This however works fine for EFI1.0 Undis because they use absolute addresses\r
-  for io/mem access.\r
-\r
-  @param ReadOrWrite  indicates read or write, IO or Memory\r
-  @param NumBytes     number of bytes to read or write\r
-  @param Address      IO or memory address to read from or write to\r
-  @param BufferAddr   memory location to read into or that contains the bytes to \r
-                      write\r
+  IO routine for UNDI. \r
+\r
+  This is a callback routine supplied to UNDI at undi_start time. This is not \r
+  currently being used by UNDI3.0 because Undi3.0 uses io/mem offsets relative \r
+  to the beginning of the device io/mem address and so it needs to use the \r
+  PCI_IO_FUNCTION that abstracts the start of the device's io/mem addresses. \r
+  Since SNP cannot retrive the context of the undi3.0 interface it cannot use \r
+  the PCI_IO_FUNCTION that specific for that NIC and uses one global IO \r
+  functions structure, this does not work. This however works fine for EFI1.0 \r
+  Undis because they use absolute addresses for io/mem access. \r
+\r
+  @param ReadOrWrite  Indicates read or write, IO or Memory.\r
+  @param NumBytes     Number of bytes to read or write.\r
+  @param Address      IO or memory address to read from or write to.\r
+  @param BufferAddr   Memory location to read into or that contains the bytes to\r
+                      write.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -222,18 +225,18 @@ SnpUndi32CallbackMemio30 (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Acquire or release a lock of the exclusive access to a critical section of the \r
+  code/data. \r
+   \r
   This is a callback routine supplied to UNDI3.1 at undi_start time.\r
   This is a callback routine supplied to UNDI3.1 at undi_start time.\r
-  UNDI call this routine when it wants to have exclusive access to a critical\r
-  section of the code/data.\r
-  New callbacks for 3.1:\r
-  there won't be a virtual2physical callback for UNDI 3.1 because undi3.1 uses\r
-  the MemMap call to map the required address by itself!\r
+  New callbacks for 3.1: there won't be a virtual2physical callback for UNDI 3.1\r
+  because undi3.1 uses the MemMap call to map the required address by itself! \r
 \r
   @param UniqueId  This was supplied to UNDI at Undi_Start, SNP uses this to \r
 \r
   @param UniqueId  This was supplied to UNDI at Undi_Start, SNP uses this to \r
-                                                                store Undi interface context (Undi does not read or write\r
-                                                                this variable)\r
-  @param Enable    non-zero indicates acquire\r
-                   zero indicates release\r
+                      store Undi interface context (Undi does not read or write\r
+                      this variable).\r
+  @param Enable    Non-zero indicates acquire; Zero indicates release. \r
+\r
 **/\r
 VOID\r
 SnpUndi32CallbackBlock (\r
 **/\r
 VOID\r
 SnpUndi32CallbackBlock (\r
@@ -256,14 +259,15 @@ SnpUndi32CallbackBlock (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Delay MicroSeconds of micro seconds.\r
+   \r
   This is a callback routine supplied to UNDI at undi_start time.\r
   This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine with the number of micro seconds when it wants to\r
-  pause.\r
 \r
   @param UniqueId      This was supplied to UNDI at Undi_Start, SNP uses this to\r
 \r
   @param UniqueId      This was supplied to UNDI at Undi_Start, SNP uses this to\r
-                                                                    store Undi interface context (Undi does not read or write\r
-                                                                    this variable)\r
-  @param MicroSeconds  number of micro seconds to pause, ususlly multiple of 10.\r
+                       store Undi interface context (Undi does not read or write\r
+                       this variable).\r
+  @param MicroSeconds  Number of micro seconds to pause, ususlly multiple of 10.  \r
+\r
 **/\r
 VOID\r
 SnpUndi32CallbackDelay (\r
 **/\r
 VOID\r
 SnpUndi32CallbackDelay (\r
@@ -277,17 +281,19 @@ SnpUndi32CallbackDelay (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  IO routine for UNDI3.1. \r
+   \r
   This is a callback routine supplied to UNDI at undi_start time.\r
   This is a callback routine supplied to UNDI at undi_start time.\r
-  This is the IO routine for UNDI3.1 to start CPB.\r
-\r
+   \r
   @param UniqueId       This was supplied to UNDI at Undi_Start, SNP uses this \r
   @param UniqueId       This was supplied to UNDI at Undi_Start, SNP uses this \r
-                                                                                       to store Undi interface context (Undi does not read or\r
-                                                                                       write this variable)\r
-  @param ReadOrWrite    indicates read or write, IO or Memory.\r
-  @param NumBytes       number of bytes to read or write.\r
+                               to store Undi interface context (Undi does not read or\r
+                               write this variable).\r
+  @param ReadOrWrite    Indicates read or write, IO or Memory.\r
+  @param NumBytes       Number of bytes to read or write.\r
   @param MemOrPortAddr  IO or memory address to read from or write to.\r
   @param MemOrPortAddr  IO or memory address to read from or write to.\r
-  @param BufferPtr      memory location to read into or that contains the bytes\r
-                        to write.\r
+  @param BufferPtr      Memory location to read into or that contains the bytes\r
+                               to write.\r
+\r
 **/\r
 VOID\r
 SnpUndi32CallbackMemio (\r
 **/\r
 VOID\r
 SnpUndi32CallbackMemio (\r
@@ -368,17 +374,18 @@ SnpUndi32CallbackMemio (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Map a CPU address to a device address. \r
+\r
   This is a callback routine supplied to UNDI at undi_start time.\r
   This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine when it has to map a CPU address to a device\r
-  address.\r
 \r
 \r
-  @param UniqueId      - This was supplied to UNDI at Undi_Start, SNP uses this to store\r
-                         Undi interface context (Undi does not read or write this variable)\r
-  @param CpuAddr       - Virtual address to be mapped!\r
-  @param NumBytes      - size of memory to be mapped\r
-  @param Direction     - direction of data flow for this memory's usage:\r
-                         cpu->device, device->cpu or both ways\r
-  @param DeviceAddrPtr - pointer to return the mapped device address\r
+  @param UniqueId      This was supplied to UNDI at Undi_Start, SNP uses this to\r
+                       store Undi interface context (Undi does not read or write\r
+                       this variable).\r
+  @param CpuAddr       Virtual address to be mapped.\r
+  @param NumBytes      Size of memory to be mapped.\r
+  @param Direction     Direction of data flow for this memory's usage:\r
+                       cpu->device, device->cpu or both ways.\r
+  @param DeviceAddrPtr Pointer to return the mapped device address.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -460,17 +467,18 @@ SnpUndi32CallbackMap (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
+  Unmap an address that was previously mapped using map callback. \r
+   \r
   This is a callback routine supplied to UNDI at undi_start time.\r
   This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine when it wants to unmap an address that was previously\r
-  mapped using map callback.\r
 \r
 \r
-  @param UniqueId    This was supplied to UNDI at Undi_Start, SNP uses this to store.\r
-                     Undi interface context (Undi does not read or write this variable)\r
-  @param CpuAddr     Virtual address that was mapped!\r
-  @param NumBytes    size of memory mapped\r
-  @param Direction   direction of data flow for this memory's usage:\r
-                     cpu->device, device->cpu or both ways\r
-  @param DeviceAddr  the mapped device address\r
+  @param UniqueId    This was supplied to UNDI at Undi_Start, SNP uses this to \r
+                     store. Undi interface context (Undi does not read or write\r
+                     this variable).\r
+  @param CpuAddr     Virtual address that was mapped.\r
+  @param NumBytes    Size of memory mapped.\r
+  @param Direction   Direction of data flow for this memory's usage: \r
+                     cpu->device, device->cpu or both ways.\r
+  @param DeviceAddr  The mapped device address.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -493,8 +501,7 @@ SnpUndi32CallbackUnmap (
     }\r
   }\r
 \r
     }\r
   }\r
 \r
-  if (Index >= MAX_MAP_LENGTH)\r
-  {\r
+  if (Index >= MAX_MAP_LENGTH) {\r
     DEBUG ((EFI_D_ERROR, "SNP could not find a mapping, failed to unmap.\n"));\r
     return ;\r
   }\r
     DEBUG ((EFI_D_ERROR, "SNP could not find a mapping, failed to unmap.\n"));\r
     return ;\r
   }\r
@@ -505,25 +512,26 @@ SnpUndi32CallbackUnmap (
   return ;\r
 }\r
 \r
   return ;\r
 }\r
 \r
-/**\r
-  This is a callback routine supplied to UNDI at undi_start time.\r
-  UNDI call this routine when it wants synchronize the virtual buffer contents\r
-  with the mapped buffer contents. The virtual and mapped buffers need not\r
-  correspond to the same physical memory (especially if the virtual address is\r
-  > 4GB). Depending on the direction for which the buffer is mapped, undi will\r
-  need to synchronize their contents whenever it writes to/reads from the buffer\r
-  using either the cpu address or the device address.\r
-\r
-  EFI does not provide a sync call, since virt=physical, we sould just do\r
-  the synchronization ourself here!\r
-\r
-  @param UniqueId    This was supplied to UNDI at Undi_Start, SNP uses this to store\r
-                     Undi interface context (Undi does not read or write this variable)\r
-  @param CpuAddr     Virtual address that was mapped!\r
-  @param NumBytes    size of memory mapped.\r
-  @param Direction   direction of data flow for this memory's usage:\r
+/** \r
+  Synchronize the virtual buffer contents with the mapped buffer contents. \r
+   \r
+  This is a callback routine supplied to UNDI at undi_start time. The virtual\r
+  and mapped buffers need not correspond to the same physical memory (especially \r
+  if the virtual address is > 4GB). Depending on the direction for which the \r
+  buffer is mapped, undi will need to synchronize their contents whenever it \r
+  writes to/reads from the buffer using either the cpu address or the device \r
+  address. \r
+  EFI does not provide a sync call since virt=physical, we should just do the \r
+  synchronization ourselves here. \r
+\r
+  @param UniqueId    This was supplied to UNDI at Undi_Start, SNP uses this to \r
+                     store Undi interface context (Undi does not read or write\r
+                     this variable).\r
+  @param CpuAddr     Virtual address that was mapped.\r
+  @param NumBytes    Size of memory mapped.\r
+  @param Direction   Direction of data flow for this memory's usage:\r
                      cpu->device, device->cpu or both ways.\r
                      cpu->device, device->cpu or both ways.\r
-  @param DeviceAddr  the mapped device address.\r
+  @param DeviceAddr  The mapped device address.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
index 304e6205fda2821d446cf1624d05d17e366e24a3..956cd59c8bb971e118316a40487558852a4548e8 100644 (file)
@@ -242,7 +242,8 @@ SimpleNetworkComponentNameGetDriverName (
   and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
   managing the controller specified by ControllerHandle and ChildHandle,\r
   then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
   and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
   managing the controller specified by ControllerHandle and ChildHandle,\r
   then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
-  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned. \r
+  Currently not implemented. \r
 \r
   @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
   @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
index 17078c81cfc9339e330d84289990d9e1587ac806..e2c911dfd2b32dc131c0cdd5d0ac6590619b51f5 100644 (file)
@@ -16,15 +16,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "Snp.h"\r
 \r
 /**\r
 #include "Snp.h"\r
 \r
 /**\r
-  this routine calls undi to get the status of the interrupts, get the list of\r
-  transmit buffers that completed transmitting!\r
-\r
-  @param  Snp                     pointer to snp driver structure\r
-  @param  InterruptStatusPtr      a non null pointer gets the interrupt status\r
-  @param  TransmitBufferListPtrs  a non null ointer gets the list of pointers of\r
-                                  previously  transmitted buffers whose\r
-                                  transmission was completed  asynchrnously.\r
-\r
+  Call undi to get the status of the interrupts, get the list of transmit \r
+  buffers that completed transmitting. \r
+\r
+  @param  Snp                     Pointer to snp driver structure.\r
+  @param  InterruptStatusPtr      A non null pointer to contain the interrupt \r
+                                  status.\r
+  @param  TransmitBufferListPtrs  A non null pointer to contain the list of \r
+                                  pointers of previous transmitted buffers whose\r
+                                  transmission was completed asynchrnously.\r
+   \r
+  @retval EFI_SUCCESS         The status of the network interface was retrieved.\r
+  @retval EFI_DEVICE_ERROR    The command could not be sent to the network \r
+                              interface.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -68,13 +72,13 @@ PxeGetStatus (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.get_status()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.get_status()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != EFI_SUCCESS) {\r
     DEBUG (\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != EFI_SUCCESS) {\r
     DEBUG (\r
-      (EFI_D_NET,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nSnp->undi.get_status()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatFlags)\r
       "\nSnp->undi.get_status()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatFlags)\r
index 5337b1cc2eab3124a750e26695f9107f9a3ab22a..43b517e9e6c1360640a6e831fba894f162fd47b8 100644 (file)
@@ -16,14 +16,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "Snp.h"\r
 \r
 /**\r
 #include "Snp.h"\r
 \r
 /**\r
-  this routine calls undi to initialize the interface.\r
+  Call UNDI to initialize the interface.\r
 \r
 \r
-  @param  Snp                   pointer to snp driver structure\r
-  @param  CableDetectFlag       Do/don't detect the cable (depending on what undi supports)\r
+  @param  Snp                   Pointer to snp driver structure.\r
+  @param  CableDetectFlag       Do/don't detect the cable (depending on what \r
+                                undi supports).\r
   \r
   \r
-  @retval EFI_SUCCESS           UNDI is initialized successfully\r
-  @retval EFI_DEVICE_ERROR      UNDI could not be initialized\r
-  @retval Other                 other errors \r
+  @retval EFI_SUCCESS           UNDI is initialized successfully.\r
+  @retval EFI_DEVICE_ERROR      UNDI could not be initialized.\r
+  @retval Other                 Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -94,7 +95,7 @@ PxeInit (
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.initialize()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.initialize()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -104,7 +105,7 @@ PxeInit (
     Status          = EFI_SUCCESS;\r
   } else {\r
     DEBUG (\r
     Status          = EFI_SUCCESS;\r
   } else {\r
     DEBUG (\r
-      (EFI_D_WARN,\r
+      (EFI_D_ERROR,\r
       "\nSnp->undi.initialize()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nSnp->undi.initialize()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
index 00c80eb95f179c353804a2f10a257348161d91a8..e11b54afaada4f39ede3abd56756cd86fbe79815 100644 (file)
@@ -16,13 +16,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "Snp.h"\r
 \r
 /**\r
 #include "Snp.h"\r
 \r
 /**\r
-  this routine calls undi to convert an multicast IP address to a MAC address.\r
+  Call undi to convert an multicast IP address to a MAC address.\r
 \r
 \r
-  @param  Snp   pointer to snp driver structure\r
-  @param  IPv6  flag to indicate if this is an ipv6 address\r
-  @param  IP    multicast IP address\r
-  @param  MAC   pointer to hold the return MAC address\r
+  @param  Snp   Pointer to snp driver structure.\r
+  @param  IPv6  Flag to indicate if this is an ipv6 address.\r
+  @param  IP    Multicast IP address.\r
+  @param  MAC   Pointer to hold the return MAC address.\r
 \r
 \r
+  @retval EFI_SUCCESS           The multicast IP address was mapped to the \r
+                                multicast HW MAC address.\r
+  @retval EFI_INVALID_PARAMETER Invalid UNDI command. \r
+  @retval EFI_UNSUPPORTED       Command is not supported by UNDI. \r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command. \r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -56,7 +61,7 @@ PxeIp2Mac (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.mcast_ip_to_mac()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.mcast_ip_to_mac()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -69,7 +74,7 @@ PxeIp2Mac (
 \r
   case PXE_STATCODE_UNSUPPORTED:\r
     DEBUG (\r
 \r
   case PXE_STATCODE_UNSUPPORTED:\r
     DEBUG (\r
-      (EFI_D_NET,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nSnp->undi.mcast_ip_to_mac()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nSnp->undi.mcast_ip_to_mac()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
@@ -82,7 +87,7 @@ PxeIp2Mac (
     // to caller.\r
     //\r
     DEBUG (\r
     // to caller.\r
     //\r
     DEBUG (\r
-      (EFI_D_NET,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nSnp->undi.mcast_ip_to_mac()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nSnp->undi.mcast_ip_to_mac()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
index 4b9259f87a0d48bb51155504e085e5a7ba508e13..d7c55a6f10d0f4c8a7fcc8b248932fc3660bc65d 100644 (file)
@@ -24,6 +24,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @param  BufferSize   number of bytes to read\r
   @param  Buffer       pointer where to read into\r
 \r
   @param  BufferSize   number of bytes to read\r
   @param  Buffer       pointer where to read into\r
 \r
+  @retval EFI_SUCCESS           The NVRAM access was performed.\r
+  @retval EFI_INVALID_PARAMETER Invalid UNDI command.\r
+  @retval EFI_UNSUPPORTED       Command is not supported by UNDI.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -55,7 +59,7 @@ PxeNvDataRead (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.nvdata ()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.nvdata ()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -65,7 +69,7 @@ PxeNvDataRead (
 \r
   case PXE_STATCODE_UNSUPPORTED:\r
     DEBUG (\r
 \r
   case PXE_STATCODE_UNSUPPORTED:\r
     DEBUG (\r
-      (EFI_D_NET,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi.nvdata()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nsnp->undi.nvdata()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
@@ -75,7 +79,7 @@ PxeNvDataRead (
 \r
   default:\r
     DEBUG (\r
 \r
   default:\r
     DEBUG (\r
-      (EFI_D_NET,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi.nvdata()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nsnp->undi.nvdata()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
index bfabe11aa5e61e63348a90ca09f33e4ae03a8c4c..23924982838651b325d89cddb0f6fa58afeb8709 100644 (file)
@@ -16,21 +16,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "Snp.h"\r
 \r
 /**\r
 #include "Snp.h"\r
 \r
 /**\r
-  this routine calls undi to receive a packet and fills in the data in the\r
-  input pointers!\r
-\r
-  @param  Snp                 pointer to snp driver structure\r
-  @param  Buffer           pointer to the memory for the received data\r
-  @param  BufferSize         is a pointer to the length of the buffer on entry and\r
-                              contains the length of the received data on return\r
-  @param  HeaderSize       pointer to the header portion of the data received.\r
-  @param  SrcAddr       optional parameter, is a pointer to contain the\r
-                              source ethernet address on return\r
-  @param  DestAddr  optional parameter, is a pointer to contain the\r
-                              destination ethernet address on return\r
-  @param  Protocol         optional parameter, is a pointer to contain the\r
-                              protocol type from the ethernet header on return\r
+  Call UNDI to receive a packet and fills in the data in the input pointers.\r
 \r
 \r
+  @param  Snp          Pointer to snp driver structure\r
+  @param  Buffer       Pointer to the memory for the received data\r
+  @param  BufferSize   Pointer to the length of the buffer on entry and contains\r
+                       the length of the received data on return\r
+  @param  HeaderSize   Pointer to the header portion of the data received.\r
+  @param  SrcAddr      Pointer to contain the source ethernet address on return \r
+  @param  DestAddr     Pointer to contain the destination ethernet address on \r
+                       return\r
+  @param  Protocol     Pointer to contain the protocol type from the ethernet \r
+                       header on return\r
+\r
+\r
+  @retval EFI_SUCCESS           The received data was stored in Buffer, and \r
+                                BufferSize has been updated to the number of \r
+                                bytes received.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command. \r
+  @retval EFI_NOT_READY         No packets have been received on the network \r
+                                interface.\r
+  @retval EFI_BUFFER_TOO_SMALL  BufferSize is too small for the received \r
+                                packets. BufferSize has been updated to the\r
+                                required size.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -74,7 +82,7 @@ PxeReceive (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive ()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive ()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -84,7 +92,7 @@ PxeReceive (
 \r
   case PXE_STATCODE_NO_DATA:\r
     DEBUG (\r
 \r
   case PXE_STATCODE_NO_DATA:\r
     DEBUG (\r
-      (EFI_D_NET,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi.receive ()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nsnp->undi.receive ()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
@@ -94,7 +102,7 @@ PxeReceive (
 \r
   default:\r
     DEBUG (\r
 \r
   default:\r
     DEBUG (\r
-      (EFI_D_ERROR,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi.receive()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nsnp->undi.receive()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
@@ -118,7 +126,10 @@ PxeReceive (
   }\r
 \r
   if (Protocol != NULL) {\r
   }\r
 \r
   if (Protocol != NULL) {\r
-    *Protocol = (UINT16) PXE_SWAP_UINT16 (Db->Protocol); /*  we need to do the byte swapping */\r
+    //\r
+    // We need to do the byte swapping\r
+    //\r
+    *Protocol = (UINT16) PXE_SWAP_UINT16 (Db->Protocol);\r
   }\r
 \r
   return (*BufferSize <= BuffSize) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;\r
   }\r
 \r
   return (*BufferSize <= BuffSize) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;\r
index db116330cd15207fcc04e61b727e6c5105bff3a3..24e89c5b484786ce5a6d40aaf33cb5827aa8931f 100644 (file)
@@ -1,21 +1,16 @@
 /** @file\r
 /** @file\r
-Copyright (c) 2004 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+    Implementation of managing the multicast receive filters of a network\r
+    interface.\r
+\r
+Copyright (c) 2004 - 2007, Intel Corporation.<BR> All rights reserved. This \r
+program and the accompanying materials are licensed and made available under the \r
+terms and conditions of the BSD License which accompanies this distribution. The \r
+full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
 \r
 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
 \r
 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
-  receive_filters.c\r
-\r
-Abstract:\r
-\r
-Revision history:\r
-  2000-Feb-17 M(f)J   Genesis.\r
-\r
 **/\r
 \r
 \r
 **/\r
 \r
 \r
@@ -23,14 +18,18 @@ Revision history:
 #include "Snp.h"\r
 \r
 /**\r
 #include "Snp.h"\r
 \r
 /**\r
-  this routine calls undi to enable the receive filters.\r
-\r
-  @param  Snp                pointer to snp driver structure\r
-  @param  EnableFlags        bit mask for enabling the receive filters\r
-  @param  MCastAddressCount  multicast address count for a new multicast address\r
-                             list\r
-  @param  MCastAddressList   list of new multicast addresses\r
+  Call undi to enable the receive filters.\r
 \r
 \r
+  @param  Snp                Pointer to snp driver structure.\r
+  @param  EnableFlags        Bit mask for enabling the receive filters.\r
+  @param  MCastAddressCount  Multicast address count for a new multicast address\r
+                             list.\r
+  @param  MCastAddressList   List of new multicast addresses. \r
+   \r
+  @retval EFI_SUCCESS           The multicast receive filter list was updated.\r
+  @retval EFI_INVALID_PARAMETER Invalid UNDI command.\r
+  @retval EFI_UNSUPPORTED       Command is not supported by UNDI.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -80,7 +79,7 @@ PxeRecvFilterEnable (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -112,14 +111,17 @@ PxeRecvFilterEnable (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  this routine calls undi to disable the receive filters.\r
+  Call undi to disable the receive filters.\r
 \r
 \r
-  @param  Snp                pointer to snp driver structure\r
-  @param  DisableFlags       bit mask for disabling the receive filters\r
-  @param  ResetMCastList     boolean flag to reset/delete the multicast filter list\r
+  @param  Snp             Pointer to snp driver structure\r
+  @param  DisableFlags    Bit mask for disabling the receive filters\r
+  @param  ResetMCastList  Boolean flag to reset/delete the multicast filter \r
+                          list.\r
 \r
 \r
-\r
-**/\r
+  @retval EFI_SUCCESS           The multicast receive filter list was updated.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.\r
+   \r
+**/ \r
 EFI_STATUS\r
 PxeRecvFilterDisable (\r
   SNP_DRIVER *Snp,\r
 EFI_STATUS\r
 PxeRecvFilterDisable (\r
   SNP_DRIVER *Snp,\r
@@ -165,7 +167,7 @@ PxeRecvFilterDisable (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -174,7 +176,7 @@ PxeRecvFilterDisable (
     // UNDI command failed.  Return UNDI status to caller.\r
     //\r
     DEBUG (\r
     // UNDI command failed.  Return UNDI status to caller.\r
     //\r
     DEBUG (\r
-      (EFI_D_ERROR,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi.receive_filters()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nsnp->undi.receive_filters()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
@@ -187,11 +189,13 @@ PxeRecvFilterDisable (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  this routine calls undi to read the receive filters.\r
-\r
-  @param  Snp                pointer to snp driver structure\r
+  Call undi to read the receive filters.\r
 \r
 \r
+  @param  Snp                Pointer to snp driver structure.\r
 \r
 \r
+  @retval EFI_SUCCESS           The receive filter was read.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command. \r
+   \r
 **/\r
 EFI_STATUS\r
 PxeRecvFilterRead (\r
 **/\r
 EFI_STATUS\r
 PxeRecvFilterRead (\r
@@ -215,7 +219,7 @@ PxeRecvFilterRead (
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
index f616d43584ccbf974ee5999f31f1a06a8c141ae8..057d3b51c5b244be3a3e9313c36de56216c4e38d 100644 (file)
@@ -1,33 +1,27 @@
 /** @file\r
 /** @file\r
-Copyright (c) 2004 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+    Implementation of resetting a network adapter.\r
\r
+Copyright (c) 2004 - 2007, Intel Corporation.<BR> All rights reserved. This \r
+program and the accompanying materials are licensed and made available under the \r
+terms and conditions of the BSD License which accompanies this distribution. The \r
+full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
 \r
 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
 \r
 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
-  reset.c\r
-\r
-Abstract:\r
-\r
-Revision history:\r
-  2000-Feb-09 M(f)J   Genesis.\r
-\r
 **/\r
 \r
 #include "Snp.h"\r
 \r
 \r
 /**\r
 **/\r
 \r
 #include "Snp.h"\r
 \r
 \r
 /**\r
-  This routine calls undi to reset the nic.\r
+  Call UNDI to reset the NIC.\r
 \r
 \r
-  @param  Snp                   pointer to the snp driver structure\r
+  @param  Snp                 Pointer to the snp driver structure.\r
 \r
 \r
-  @return EFI_SUCCESSFUL for a successful completion\r
-  @return other for failed calls\r
+  @return EFI_SUCCESSFUL      The NIC was reset.\r
+  @retval EFI_DEVICE_ERROR    The NIC cannot be reset.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -49,13 +43,13 @@ PxeReset (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.reset()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.reset()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
     DEBUG (\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
     DEBUG (\r
-      (EFI_D_WARN,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi32.reset()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
       "\nsnp->undi32.reset()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
index a996c2c50ae6e90bd6c6ce8e9b3a53f0b016f596..21ed2bfe206898c83755edbc239632695d1868b5 100644 (file)
@@ -16,12 +16,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  this routine calls undi to shut down the interface.\r
+  Call UNDI to shut down the interface.\r
 \r
 \r
-  @param  Snp   pointer to snp driver structure\r
+  @param  Snp   Pointer to snp driver structure.\r
 \r
 \r
-  @retval EFI_SUCCESS        UNDI is shut down successfully\r
-  @retval EFI_DEVICE_ERROR   UNDI could not be shut down\r
+  @retval EFI_SUCCESS        UNDI is shut down successfully.\r
+  @retval EFI_DEVICE_ERROR   UNDI could not be shut down.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -43,7 +43,7 @@ PxeShutdown (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.shutdown()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.shutdown()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -51,7 +51,7 @@ PxeShutdown (
     //\r
     // UNDI could not be shutdown. Return UNDI error.\r
     //\r
     //\r
     // UNDI could not be shutdown. Return UNDI error.\r
     //\r
-    DEBUG ((EFI_D_WARN, "\nsnp->undi.shutdown()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
+    DEBUG ((EFI_D_ERROR, "\nsnp->undi.shutdown()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
 \r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
     return EFI_DEVICE_ERROR;\r
   }\r
index 80a05f102f90f261a92c74d50c9661c126f38ec3..58451608e5737f30be2cc7f719068f1233b06ae1 100644 (file)
@@ -24,10 +24,14 @@ V2P                         *mV2p = NULL; // undi3.0 map_list head
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Unsupport currently.\r
+  Send command to UNDI. It does nothing currently.\r
   \r
   @param Cdb   command to be sent to UNDI.\r
   \r
   @param Cdb   command to be sent to UNDI.\r
-\r
+   \r
+  @retval EFI_INVALID_PARAMETER  The command is 0. \r
+  @retval EFI_UNSUPPORTED        Default return status because it's not \r
+                                 supported currently.\r
+   \r
 **/\r
 EFI_STATUS\r
 IssueHwUndiCommand (\r
 **/\r
 EFI_STATUS\r
 IssueHwUndiCommand (\r
@@ -53,8 +57,8 @@ IssueHwUndiCommand (
   @param  Buffer               Pointer to buffer.\r
   @param  Length               Length of buffer in bytes.\r
 \r
   @param  Buffer               Pointer to buffer.\r
   @param  Length               Length of buffer in bytes.\r
 \r
-  @return 8-bit checksum of all bytes in buffer.\r
-  @return If ptr is NULL or len is zero, zero is returned.\r
+  @return 8-bit checksum of all bytes in buffer, or zero if ptr is NULL or len \r
+          is zero.\r
 \r
 **/\r
 UINT8\r
 \r
 **/\r
 UINT8\r
@@ -89,13 +93,13 @@ Calc8BitCksum (
   Supported() it must also follow these calling restrictions.\r
 \r
   @param  This                Protocol instance pointer.\r
   Supported() it must also follow these calling restrictions.\r
 \r
   @param  This                Protocol instance pointer.\r
-  @param  ControllerHandle    Handle of device to test\r
+  @param  ControllerHandle    Handle of device to test.\r
   @param  RemainingDevicePath Optional parameter use to pick a specific child\r
                               device to start.\r
 \r
   @param  RemainingDevicePath Optional parameter use to pick a specific child\r
                               device to start.\r
 \r
-  @retval EFI_SUCCESS         This driver supports this device\r
-  @retval EFI_ALREADY_STARTED This driver is already running on this device\r
-  @retval other               This driver does not support this device\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval EFI_ALREADY_STARTED This driver is already running on this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -151,7 +155,7 @@ SimpleNetworkDriverSupported (
   // Check to see if !PXE structure is valid. Paragraph alignment of !PXE structure is required.\r
   //\r
   if (NiiProtocol->ID & 0x0F) {\r
   // Check to see if !PXE structure is valid. Paragraph alignment of !PXE structure is required.\r
   //\r
   if (NiiProtocol->ID & 0x0F) {\r
-    DEBUG ((EFI_D_NET, "\n!PXE structure is not paragraph aligned.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE structure is not paragraph aligned.\n"));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
@@ -162,25 +166,25 @@ SimpleNetworkDriverSupported (
   //  Verify !PXE revisions.\r
   //\r
   if (Pxe->hw.Signature != PXE_ROMID_SIGNATURE) {\r
   //  Verify !PXE revisions.\r
   //\r
   if (Pxe->hw.Signature != PXE_ROMID_SIGNATURE) {\r
-    DEBUG ((EFI_D_NET, "\n!PXE signature is not valid.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE signature is not valid.\n"));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
 \r
   if (Pxe->hw.Rev < PXE_ROMID_REV) {\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
 \r
   if (Pxe->hw.Rev < PXE_ROMID_REV) {\r
-    DEBUG ((EFI_D_NET, "\n!PXE.Rev is not supported.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE.Rev is not supported.\n"));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
 \r
   if (Pxe->hw.MajorVer < PXE_ROMID_MAJORVER) {\r
 \r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
 \r
   if (Pxe->hw.MajorVer < PXE_ROMID_MAJORVER) {\r
 \r
-    DEBUG ((EFI_D_NET, "\n!PXE.MajorVer is not supported.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE.MajorVer is not supported.\n"));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
 \r
   } else if (Pxe->hw.MajorVer == PXE_ROMID_MAJORVER && Pxe->hw.MinorVer < PXE_ROMID_MINORVER) {\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
 \r
   } else if (Pxe->hw.MajorVer == PXE_ROMID_MAJORVER && Pxe->hw.MinorVer < PXE_ROMID_MINORVER) {\r
-    DEBUG ((EFI_D_NET, "\n!PXE.MinorVer is not supported."));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE.MinorVer is not supported."));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
@@ -189,13 +193,13 @@ SimpleNetworkDriverSupported (
   //\r
   if ((Pxe->hw.Implementation & PXE_ROMID_IMP_HW_UNDI) == 0) {\r
     if (Pxe->sw.EntryPoint < Pxe->sw.Len) {\r
   //\r
   if ((Pxe->hw.Implementation & PXE_ROMID_IMP_HW_UNDI) == 0) {\r
     if (Pxe->sw.EntryPoint < Pxe->sw.Len) {\r
-      DEBUG ((EFI_D_NET, "\n!PXE S/W entry point is not valid."));\r
+      DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE S/W entry point is not valid."));\r
       Status = EFI_UNSUPPORTED;\r
       goto Done;\r
     }\r
 \r
     if (Pxe->sw.BusCnt == 0) {\r
       Status = EFI_UNSUPPORTED;\r
       goto Done;\r
     }\r
 \r
     if (Pxe->sw.BusCnt == 0) {\r
-      DEBUG ((EFI_D_NET, "\n!PXE.BusCnt is zero."));\r
+      DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE.BusCnt is zero."));\r
       Status = EFI_UNSUPPORTED;\r
       goto Done;\r
     }\r
       Status = EFI_UNSUPPORTED;\r
       goto Done;\r
     }\r
@@ -254,7 +258,7 @@ SimpleNetworkDriverStart (
   UINT8                                     BarIndex;\r
   PXE_STATFLAGS                             InitStatFlags;\r
 \r
   UINT8                                     BarIndex;\r
   PXE_STATFLAGS                             InitStatFlags;\r
 \r
-  DEBUG ((EFI_D_NET, "\nSnpNotifyNetworkInterfaceIdentifier()  "));\r
+  DEBUG ((EFI_D_INFO, "\nSnpNotifyNetworkInterfaceIdentifier()  "));\r
 \r
   Status = gBS->OpenProtocol (\r
                   Controller,\r
 \r
   Status = gBS->OpenProtocol (\r
                   Controller,\r
@@ -316,7 +320,7 @@ SimpleNetworkDriverStart (
   Pxe = (PXE_UNDI *) (UINTN) (Nii->ID);\r
 \r
   if (Calc8BitCksum (Pxe, Pxe->hw.Len) != 0) {\r
   Pxe = (PXE_UNDI *) (UINTN) (Nii->ID);\r
 \r
   if (Calc8BitCksum (Pxe, Pxe->hw.Len) != 0) {\r
-    DEBUG ((EFI_D_NET, "\n!PXE checksum is not correct.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\n!PXE checksum is not correct.\n"));\r
     goto NiiError;\r
   }\r
 \r
     goto NiiError;\r
   }\r
 \r
@@ -331,7 +335,7 @@ SimpleNetworkDriverStart (
     //  broadcast support or we cannot do DHCP!\r
     //\r
   } else {\r
     //  broadcast support or we cannot do DHCP!\r
     //\r
   } else {\r
-    DEBUG ((EFI_D_NET, "\nUNDI does not have promiscuous or broadcast support."));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\nUNDI does not have promiscuous or broadcast support."));\r
     goto NiiError;\r
   }\r
   //\r
     goto NiiError;\r
   }\r
   //\r
@@ -348,7 +352,7 @@ SimpleNetworkDriverStart (
                         );\r
 \r
   if (Status != EFI_SUCCESS) {\r
                         );\r
 \r
   if (Status != EFI_SUCCESS) {\r
-    DEBUG ((EFI_D_NET, "\nCould not allocate SNP_DRIVER structure.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\nCould not allocate SNP_DRIVER structure.\n"));\r
     goto NiiError;\r
   }\r
 \r
     goto NiiError;\r
   }\r
 \r
@@ -422,7 +426,7 @@ SimpleNetworkDriverStart (
                         );\r
 \r
   if (Status != EFI_SUCCESS) {\r
                         );\r
 \r
   if (Status != EFI_SUCCESS) {\r
-    DEBUG ((EFI_D_NET, "\nCould not allocate CPB and DB structures.\n"));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\nCould not allocate CPB and DB structures.\n"));\r
     goto Error_DeleteSNP;\r
   }\r
 \r
     goto Error_DeleteSNP;\r
   }\r
 \r
@@ -464,7 +468,7 @@ SimpleNetworkDriverStart (
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.get_init_info()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.get_init_info()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -474,7 +478,7 @@ SimpleNetworkDriverStart (
   InitStatFlags = Snp->Cdb.StatFlags;\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
   InitStatFlags = Snp->Cdb.StatFlags;\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
-    DEBUG ((EFI_D_NET, "\nSnp->undi.init_info()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\nSnp->undi.init_info()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
   }\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
   }\r
@@ -494,12 +498,12 @@ SimpleNetworkDriverStart (
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.get_config_info()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.get_config_info()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
-    DEBUG ((EFI_D_NET, "\nSnp->undi.config_info()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
+    DEBUG ((EFI_D_ERROR | EFI_D_NET, "\nSnp->undi.config_info()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
   }\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
   }\r
@@ -609,7 +613,7 @@ SimpleNetworkDriverStart (
   Status = PxeGetStnAddr (Snp);\r
 \r
   if (Status != EFI_SUCCESS) {\r
   Status = PxeGetStnAddr (Snp);\r
 \r
   if (Status != EFI_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR, "\nSnp->undi.get_station_addr()  failed.\n"));\r
+    DEBUG ((EFI_D_ERROR, "\nSnp->undi.get_station_addr() failed.\n"));\r
     PxeShutdown (Snp);\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
     PxeShutdown (Snp);\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
@@ -811,27 +815,27 @@ AddV2P (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  *V2p = AllocatePool (sizeof (V2P  ));\r
+  *V2p = AllocatePool (sizeof (V2P));\r
   if (*V2p != NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
   Status = mPciIo->Map (\r
   if (*V2p != NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
   Status = mPciIo->Map (\r
-                        mPciIo,\r
-                        Type,\r
-                        VirtualAddress,\r
-                        &BufferSize,\r
-                        &(*V2p)->PhysicalAddress,\r
-                        &(*V2p)->Unmap\r
-                        );\r
+                     mPciIo,\r
+                     Type,\r
+                     VirtualAddress,\r
+                     &BufferSize,\r
+                     &(*V2p)->PhysicalAddress,\r
+                     &(*V2p)->Unmap\r
+                     );\r
   if (Status != EFI_SUCCESS) {\r
     FreePool (*V2p);\r
     return Status;\r
   }\r
   (*V2p)->VirtualAddress = VirtualAddress;\r
   if (Status != EFI_SUCCESS) {\r
     FreePool (*V2p);\r
     return Status;\r
   }\r
   (*V2p)->VirtualAddress = VirtualAddress;\r
-  (*V2p)->BufferSize = BufferSize;\r
-  (*V2p)->Next  = mV2p;\r
-  mV2p          = *V2p;\r
+  (*V2p)->BufferSize     = BufferSize;\r
+  (*V2p)->Next           = mV2p;\r
+  mV2p                   = *V2p;\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -846,8 +850,8 @@ AddV2P (
   @param  VirtualAddr          virtual address (or CPU address) to be searched in\r
                                the map list\r
 \r
   @param  VirtualAddr          virtual address (or CPU address) to be searched in\r
                                the map list\r
 \r
-  @retval EFI_SUCEESS          if a match found!\r
-  @retval Other                match not found\r
+  @retval EFI_SUCEESS          A match was found.\r
+  @retval Other                A match cannot be found.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -874,13 +878,13 @@ FindV2p (
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  This routine unmaps the given virtual address and frees the memory allocated\r
-  for the map list node corresponding to that address.\r
+  Unmap the given virtual address and free the memory allocated for the map list\r
+  node corresponding to that address.\r
 \r
 \r
-  @param  VirtualAddress       virtual address (or CPU address) to be unmapped\r
+  @param  VirtualAddress       virtual address (or CPU address) to be unmapped.\r
 \r
 \r
-  @retval EFI_SUCEESS          if successfully unmapped\r
-  @retval Other                as indicated by the error\r
+  @retval EFI_SUCEESS          Successfully unmapped.\r
+  @retval Other                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
index 675057577c6e4bc7c2fd7702e70e6a519ebcb5ec..ff7ad7b444fef415958bf9c096122e3932cecb44 100644 (file)
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _SNP_H_\r
 \r
 \r
 #define _SNP_H_\r
 \r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/SimpleNetwork.h>\r
 #include <Protocol/PciIo.h>\r
 \r
 #include <Protocol/SimpleNetwork.h>\r
 #include <Protocol/PciIo.h>\r
index 6d38368549ed824a874c61d43529d95b25f806d3..c143c0b2dc04c454e5d863de3717dc9475a282be 100644 (file)
@@ -1,19 +1,16 @@
 #/** @file\r
 #/** @file\r
-# Component name for module SNP\r
+#    Component description file for SNP module.\r
 #\r
 #\r
-# FIX ME!\r
-# Copyright (c) 2006, Intel Corporation.\r
+# Copyright (c) 2006, Intel Corporation. <BR> \r
+# All rights reserved. This program and the accompanying materials are licensed \r
+# and made available under the terms and conditions of the BSD License which \r
+# accompanies this distribution. The full text of the license may be found at \r
+# http://opensource.org/licenses/bsd-license.php \r
 #\r
 #\r
-#  All rights reserved. This program and the accompanying materials\r
-#  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution. The full text of the license may be found at\r
-#  http://opensource.org/licenses/bsd-license.php\r
+# 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
 #\r
-#  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
-#\r
-#**/\r
+**/\r
 \r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
 \r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
index 5c5daeaa6039bffdfa0b42a4fb5550aa95a3b5f0..5beebad27459746230588eb7904839204575a1b5 100644 (file)
@@ -16,12 +16,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  this routine calls undi to start the interface and changes the snp state.\r
+  Call UNDI to start the interface and changes the snp state.\r
 \r
 \r
-  @param  Snp                    pointer to snp driver structure\r
+  @param  Snp                    pointer to snp driver structure.\r
 \r
 \r
-  @retval EFI_DEVICE_ERROR       UNDI could not be started\r
-  @retval EFI_SUCCESS            UNDI is started successfully\r
+  @retval EFI_SUCCESS            UNDI is started successfully.\r
+  @retval EFI_DEVICE_ERROR       UNDI could not be started.\r
   \r
 **/\r
 EFI_STATUS\r
   \r
 **/\r
 EFI_STATUS\r
@@ -72,7 +72,7 @@ PxeStart (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.start()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.start()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -99,7 +99,7 @@ PxeStart (
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Changes the state of a network interface from "stopped" to "started."\r
+  Change the state of a network interface from "stopped" to "started."\r
   \r
   This function starts a network interface. If the network interface successfully\r
   starts, then EFI_SUCCESS will be returned.\r
   \r
   This function starts a network interface. If the network interface successfully\r
   starts, then EFI_SUCCESS will be returned.\r
index 07df584a07cb88c998ac50425867f9f3b62da59b..42792c26e148e70e1b1e3afdcc406d14961aba60 100644 (file)
@@ -16,13 +16,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  this routine calls undi to read the MAC address of the NIC and updates the\r
-  mode structure with the address.\r
+  Call UNDI to read the MAC address of the NIC and update the mode structure \r
+  with the address. \r
 \r
 \r
-  @param  Snp         pointer to snp driver structure.\r
+  @param  Snp         Pointer to snp driver structure.\r
    \r
    \r
-  @retval EFI_SUCCESS       the MAC address of the NIC is read successfully.\r
-  @retval EFI_DEVICE_ERROR  failed to read the MAC address of the NIC.\r
+  @retval EFI_SUCCESS       The MAC address of the NIC is read successfully.\r
+  @retval EFI_DEVICE_ERROR  Failed to read the MAC address of the NIC.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -50,7 +50,7 @@ PxeGetStnAddr (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.station_addr()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.station_addr()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -90,10 +90,10 @@ PxeGetStnAddr (
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  this routine calls undi to set a new MAC address for the NIC,\r
+  Call UNDI to set a new MAC address for the NIC.\r
 \r
 \r
-  @param  Snp         pointer to Snp driver structure\r
-  @param  NewMacAddr  pointer to a mac address to be set for the nic, if this is\r
+  @param  Snp         Pointer to Snp driver structure.\r
+  @param  NewMacAddr  Pointer to a MAC address to be set for the NIC, if this is\r
                       NULL then this routine resets the mac address to the NIC's\r
                       original address.\r
 \r
                       NULL then this routine resets the mac address to the NIC's\r
                       original address.\r
 \r
@@ -139,7 +139,7 @@ PxeSetStnAddr (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.station_addr()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.station_addr()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
index c52fc23db36c01207c8eba78b2f23ddf377a86b9..5261a8441ce74bec8bef737e6988837ba09ebd14 100644 (file)
@@ -139,7 +139,7 @@ SnpUndi32Statistics (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.statistics()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.statistics()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
index 2eedfcd72617f880d4b7f91a5270a3daeb4110b3..f707ed4fa16143c250dbfd22382abb532c30d1a5 100644 (file)
@@ -16,14 +16,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  this routine calls undi to stop the interface and changes the snp state.\r
+  Call UNDI to stop the interface and changes the snp state.\r
 \r
 \r
-  @param  Snp   pointer to snp driver structure\r
-\r
-  @retval EFI_INVALID_PARAMETER  invalid parameter\r
-  @retval EFI_NOT_STARTED        SNP is not started\r
-  @retval EFI_DEVICE_ERROR       SNP is not initialized\r
-  @retval EFI_UNSUPPORTED        operation unsupported\r
+  @param  Snp   Pointer to snp driver structure\r
+   \r
+  @retval EFI_SUCCESS            The network interface was stopped.\r
+  @retval EFI_DEVICE_ERROR       SNP is not initialized.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -45,13 +43,13 @@ PxeStop (
   //\r
   // Issue UNDI command\r
   //\r
   //\r
   // Issue UNDI command\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.stop()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.stop()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
     DEBUG (\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
   if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
     DEBUG (\r
-      (EFI_D_WARN,\r
+      (EFI_D_ERROR,\r
       "\nsnp->undi.stop()  %xh:%xh\n",\r
       Snp->Cdb.StatCode,\r
       Snp->Cdb.StatFlags)\r
       "\nsnp->undi.stop()  %xh:%xh\n",\r
       Snp->Cdb.StatCode,\r
       Snp->Cdb.StatFlags)\r
@@ -74,15 +72,18 @@ PxeStop (
   interface is in the started state. If the network interface was successfully\r
   stopped, then EFI_SUCCESS will be returned.\r
   \r
   interface is in the started state. If the network interface was successfully\r
   stopped, then EFI_SUCCESS will be returned.\r
   \r
-  @param  This                    A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.\r
+  @param  This                    A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL \r
+                                  instance.\r
   \r
   \r
   @retval EFI_SUCCESS             The network interface was stopped.\r
   @retval EFI_NOT_STARTED         The network interface has not been started.\r
   \r
   \r
   @retval EFI_SUCCESS             The network interface was stopped.\r
   @retval EFI_NOT_STARTED         The network interface has not been started.\r
-  @retval EFI_INVALID_PARAMETER   This parameter was NULL or did not point to a valid \r
-                                  EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
-  @retval EFI_DEVICE_ERROR        The command could not be sent to the network interface.\r
-  @retval EFI_UNSUPPORTED         This function is not supported by the network interface.\r
+  @retval EFI_INVALID_PARAMETER   This parameter was NULL or did not point to a \r
+                                  valid EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
+  @retval EFI_DEVICE_ERROR        The command could not be sent to the network \r
+                                  interface.\r
+  @retval EFI_UNSUPPORTED         This function is not supported by the network \r
+                                  interface.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
index c9d8e715aa1ff18d6ed7f7964d80f35ee555c05a..f103a59b3fb769d7ab5e0d19f3797b95b453aa31 100644 (file)
@@ -16,19 +16,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  This routine calls undi to create the meadia header for the given data buffer.\r
+  Call UNDI to create the meadia header for the given data buffer.\r
 \r
 \r
-  @param  Snp                 pointer to SNP driver structure\r
-  @param  MacHeaderPtr        address where the media header will be filled in.\r
-  @param  HeaderSize       size of the memory at MacHeaderPtr\r
-  @param  Buffer           data buffer pointer\r
-  @param  BufferSize        Size of data in the Buffer\r
-  @param  DestAddr  address of the destination mac address buffer\r
-  @param  SrcAddr       address of the source mac address buffer\r
-  @param  ProtocolPtr         address of the protocol type\r
+  @param  Snp              Pointer to SNP driver structure.\r
+  @param  MacHeaderPtr     Address where the media header will be filled in.\r
+  @param  HeaderSize       Size of the memory at MacHeaderPtr.\r
+  @param  Buffer           Data buffer pointer.\r
+  @param  BufferSize       Size of data in the Buffer\r
+  @param  DestAddr         Address of the destination mac address buffer.\r
+  @param  SrcAddr          Address of the source mac address buffer.\r
+  @param  ProtocolPtr      Address of the protocol type.\r
 \r
 \r
-  @retval EFI_SUCCESS         if successfully completed the undi call\r
-  @retval Other               error return from undi call.\r
+  @retval EFI_SUCCESS      Successfully completed the undi call.\r
+  @retval Other            Error return from undi call.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -101,7 +101,7 @@ PxeFillHeader (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.fill_header()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.fill_header()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
@@ -177,16 +177,16 @@ PxeTransmit (
   //\r
   // Issue UNDI command and check result.\r
   //\r
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nSnp->undi.transmit()  "));\r
-  DEBUG ((EFI_D_NET, "\nSnp->Cdb.OpCode  == %x", Snp->Cdb.OpCode));\r
-  DEBUG ((EFI_D_NET, "\nSnp->Cdb.CPBaddr == %LX", Snp->Cdb.CPBaddr));\r
-  DEBUG ((EFI_D_NET, "\nSnp->Cdb.DBaddr  == %LX", Snp->Cdb.DBaddr));\r
-  DEBUG ((EFI_D_NET, "\nCpb->FrameAddr   == %LX\n", Cpb->FrameAddr));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->undi.transmit()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->Cdb.OpCode  == %x", Snp->Cdb.OpCode));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->Cdb.CPBaddr == %LX", Snp->Cdb.CPBaddr));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->Cdb.DBaddr  == %LX", Snp->Cdb.DBaddr));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nCpb->FrameAddr   == %LX\n", Cpb->FrameAddr));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
 \r
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
-  DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit()  "));\r
-  DEBUG ((EFI_D_NET, "\nSnp->Cdb.StatCode == %r", Snp->Cdb.StatCode));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nexit Snp->undi.transmit()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nSnp->Cdb.StatCode == %r", Snp->Cdb.StatCode));\r
 \r
   //\r
   // we will unmap the buffers in get_status call, not here\r
 \r
   //\r
   // we will unmap the buffers in get_status call, not here\r
index 8dd8fd997e8c6b3730132712b80eeecf15adb7fd..5acdb7d6d716d56d16d2cc38f583ff944551ef99 100644 (file)
@@ -25,8 +25,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 VOID\r
 EFIAPI\r
 SnpWaitForPacketNotify (\r
 VOID\r
 EFIAPI\r
 SnpWaitForPacketNotify (\r
-  EFI_EVENT Event,\r
-  VOID      *SnpPtr\r
+  EFI_EVENT     Event,\r
+  VOID          *SnpPtr\r
   )\r
 {\r
   PXE_DB_GET_STATUS PxeDbGetStatus;\r
   )\r
 {\r
   PXE_DB_GET_STATUS PxeDbGetStatus;\r
@@ -90,5 +90,3 @@ SnpWaitForPacketNotify (
     gBS->SignalEvent (Event);\r
   }\r
 }\r
     gBS->SignalEvent (Event);\r
   }\r
 }\r
-\r
-/* eof - WaitForPacket.c */\r