/**\r
This routine calls 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
\r
**/\r
EFI_STATUS\r
-pxe_reset (\r
- SNP_DRIVER *snp\r
+PxeReset (\r
+ SNP_DRIVER *Snp\r
)\r
{\r
- snp->cdb.OpCode = PXE_OPCODE_RESET;\r
- snp->cdb.OpFlags = PXE_OPFLAGS_NOT_USED;\r
- snp->cdb.CPBsize = PXE_CPBSIZE_NOT_USED;\r
- snp->cdb.DBsize = PXE_DBSIZE_NOT_USED;\r
- snp->cdb.CPBaddr = PXE_CPBADDR_NOT_USED;\r
- snp->cdb.DBaddr = PXE_DBADDR_NOT_USED;\r
- snp->cdb.StatCode = PXE_STATCODE_INITIALIZE;\r
- snp->cdb.StatFlags = PXE_STATFLAGS_INITIALIZE;\r
- snp->cdb.IFnum = snp->if_num;\r
- snp->cdb.Control = PXE_CONTROL_LAST_CDB_IN_LIST;\r
+ Snp->Cdb.OpCode = PXE_OPCODE_RESET;\r
+ Snp->Cdb.OpFlags = PXE_OPFLAGS_NOT_USED;\r
+ Snp->Cdb.CPBsize = PXE_CPBSIZE_NOT_USED;\r
+ Snp->Cdb.DBsize = PXE_DBSIZE_NOT_USED;\r
+ Snp->Cdb.CPBaddr = PXE_CPBADDR_NOT_USED;\r
+ Snp->Cdb.DBaddr = PXE_DBADDR_NOT_USED;\r
+ Snp->Cdb.StatCode = PXE_STATCODE_INITIALIZE;\r
+ Snp->Cdb.StatFlags = PXE_STATFLAGS_INITIALIZE;\r
+ Snp->Cdb.IFnum = Snp->IfNum;\r
+ Snp->Cdb.Control = PXE_CONTROL_LAST_CDB_IN_LIST;\r
\r
//\r
// Issue UNDI command and check result.\r
//\r
DEBUG ((EFI_D_NET, "\nsnp->undi.reset() "));\r
\r
- (*snp->issue_undi32_command) ((UINT64)(UINTN) &snp->cdb);\r
+ (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
\r
- if (snp->cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
+ if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {\r
DEBUG (\r
(EFI_D_WARN,\r
"\nsnp->undi32.reset() %xh:%xh\n",\r
- snp->cdb.StatFlags,\r
- snp->cdb.StatCode)\r
+ Snp->Cdb.StatFlags,\r
+ Snp->Cdb.StatCode)\r
);\r
\r
//\r
\r
\r
/**\r
- This is the SNP interface routine for resetting the NIC\r
- This routine basically retrieves snp structure, checks the SNP state and\r
- calls the pxe_reset routine to actually do the reset!\r
-\r
- @param this context pointer\r
- @param ExtendedVerification not implemented\r
-\r
+ Resets a network adapter and reinitializes it with the parameters that were\r
+ provided in the previous call to Initialize().\r
+\r
+ This function resets a network adapter and reinitializes it with the parameters\r
+ that were provided in the previous call to Initialize(). The transmit and \r
+ receive queues are emptied and all pending interrupts are cleared.\r
+ Receive filters, the station address, the statistics, and the multicast-IP-to-HW \r
+ MAC addresses are not reset by this call. If the network interface was \r
+ successfully reset, then EFI_SUCCESS will be returned. If the driver has not \r
+ been initialized, EFI_DEVICE_ERROR will be returned.\r
+\r
+ @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.\r
+ @param ExtendedVerification Indicates that the driver may perform a more \r
+ exhaustive verification operation of the device \r
+ during reset.\r
+\r
+ @retval EFI_SUCCESS The network interface was reset.\r
+ @retval EFI_NOT_STARTED The network interface has not been started.\r
+ @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\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
\r
**/\r
EFI_STATUS\r
EFIAPI\r
-snp_undi32_reset (\r
- IN EFI_SIMPLE_NETWORK_PROTOCOL *this,\r
+SnpUndi32Reset (\r
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
IN BOOLEAN ExtendedVerification\r
)\r
{\r
- SNP_DRIVER *snp;\r
+ SNP_DRIVER *Snp;\r
EFI_TPL OldTpl;\r
EFI_STATUS Status;\r
\r
ExtendedVerification = 0;\r
DEBUG ((EFI_D_WARN, "ExtendedVerification = %d is not implemented!\n", ExtendedVerification));\r
\r
- if (this == NULL) {\r
+ if (This == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (this);\r
+ Snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (This);\r
\r
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
- switch (snp->mode.State) {\r
+ switch (Snp->Mode.State) {\r
case EfiSimpleNetworkInitialized:\r
break;\r
\r
goto ON_EXIT;\r
}\r
\r
- Status = pxe_reset (snp);\r
+ Status = PxeReset (Snp);\r
\r
ON_EXIT:\r
gBS->RestoreTPL (OldTpl);\r