//\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
- @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
// 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
}\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
- UNDI call this routine when it wants to have exclusive access to a critical\r
- section of the code/data.\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
/**\r
+ Delay MicroSeconds of micro seconds.\r
+ \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 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
/**\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
/**\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
- 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
- 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
\r
/**\r
+ Delay MicroSeconds of micro seconds.\r
+ \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
- 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
\r
/**\r
+ IO routine for UNDI3.1. \r
+ \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
- 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 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
\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
- UNDI call this routine when it has to map a CPU address to a device\r
- address.\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
/**\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
- UNDI call this routine when it wants to unmap an address that was previously\r
- mapped using map callback.\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
\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
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
- @param DeviceAddr the mapped device address.\r
+ @param DeviceAddr The mapped device address.\r
\r
**/\r
VOID\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
#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
// 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
- (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
#include "Snp.h"\r
\r
/**\r
- this routine calls undi to initialize the interface.\r
+ Call UNDI to initialize the interface.\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
- @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
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
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
#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
- @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
+ @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
// 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
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
// 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
@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
// 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
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
\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
#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
+ @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
// 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
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
\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
}\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
/** @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
-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
#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
+ @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
// 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
\r
/**\r
- this routine calls undi to disable the receive filters.\r
+ Call undi to disable the receive filters.\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
+ @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
//\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
// 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
}\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
+ @param Snp Pointer to snp driver structure.\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
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
/** @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
-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
- This routine calls undi to reset the nic.\r
+ Call UNDI to reset the NIC.\r
\r
- @param Snp pointer to the snp driver structure\r
+ @param Snp Pointer to the snp driver structure.\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
// 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
- (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
\r
\r
/**\r
- this routine calls undi to shut down the interface.\r
+ Call UNDI to shut down the interface.\r
\r
- @param Snp pointer to snp driver structure\r
+ @param Snp Pointer to snp driver structure.\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
// 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
// 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
\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
+ \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
@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
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
- @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
// 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
// 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
- 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
- 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
- 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
//\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
- 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
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
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
// 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
);\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
);\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
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
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
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
- 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
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
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
- 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
- (*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
@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
/**\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
- @param VirtualAddress virtual address (or CPU address) to be unmapped\r
+ @param VirtualAddress virtual address (or CPU address) to be unmapped.\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
#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
#/** @file\r
-# Component name for module SNP\r
+# Component description file for SNP module.\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
-# 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
-# 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
\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
- @param Snp pointer to snp driver structure\r
+ @param Snp pointer to snp driver structure.\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
// 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
\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
\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
- @param Snp pointer to snp driver structure.\r
+ @param Snp Pointer to snp driver structure.\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
// 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
\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
- @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
//\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
// 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
\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
- @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
// 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
- (EFI_D_WARN,\r
+ (EFI_D_ERROR,\r
"\nsnp->undi.stop() %xh:%xh\n",\r
Snp->Cdb.StatCode,\r
Snp->Cdb.StatFlags)\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
- @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
/**\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
- @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
- @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
// 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
// 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
- 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
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
gBS->SignalEvent (Event);\r
}\r
}\r
-\r
-/* eof - WaitForPacket.c */\r