]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/SnpDxe/Snp.c
NetworkPkg: Change use of EFI_D_* to DEBUG_*
[mirror_edk2.git] / NetworkPkg / SnpDxe / Snp.c
index fe022e16eacc5584423182e27136736dc13d4898..d0d086e5780a35579cb3e950f83bfb0d1ae3b906 100644 (file)
@@ -50,7 +50,7 @@ IssueHwUndiCommand (
   UINT64 Cdb\r
   )\r
 {\r
-  DEBUG ((EFI_D_ERROR, "\nIssueHwUndiCommand() - This should not be called!"));\r
+  DEBUG ((DEBUG_ERROR, "\nIssueHwUndiCommand() - This should not be called!"));\r
 \r
   if (Cdb == 0) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -149,12 +149,12 @@ SimpleNetworkDriverSupported (
 \r
   if (EFI_ERROR (Status)) {\r
     if (Status == EFI_ALREADY_STARTED) {\r
-      DEBUG ((EFI_D_INFO, "Support(): Already Started. on handle %p\n", Controller));\r
+      DEBUG ((DEBUG_INFO, "Support(): Already Started. on handle %p\n", Controller));\r
     }\r
     return Status;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "Support(): UNDI3.1 found on handle %p\n", Controller));\r
+  DEBUG ((DEBUG_INFO, "Support(): UNDI3.1 found on handle %p\n", Controller));\r
 \r
   //\r
   // check the version, we don't want to connect to the undi16\r
@@ -167,7 +167,7 @@ SimpleNetworkDriverSupported (
   // Check to see if !PXE structure is valid. Paragraph alignment of !PXE structure is required.\r
   //\r
   if ((NiiProtocol->Id & 0x0F) != 0) {\r
-    DEBUG ((EFI_D_NET, "\n!PXE structure is not paragraph aligned.\n"));\r
+    DEBUG ((DEBUG_NET, "\n!PXE structure is not paragraph aligned.\n"));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
@@ -178,25 +178,25 @@ SimpleNetworkDriverSupported (
   //  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 ((DEBUG_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 ((DEBUG_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 ((DEBUG_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 ((DEBUG_NET, "\n!PXE.MinorVer is not supported."));\r
     Status = EFI_UNSUPPORTED;\r
     goto Done;\r
   }\r
@@ -205,20 +205,20 @@ SimpleNetworkDriverSupported (
   //\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 ((DEBUG_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 ((DEBUG_NET, "\n!PXE.BusCnt is zero."));\r
       Status = EFI_UNSUPPORTED;\r
       goto Done;\r
     }\r
   }\r
 \r
   Status = EFI_SUCCESS;\r
-  DEBUG ((EFI_D_INFO, "Support(): supported on %p\n", Controller));\r
+  DEBUG ((DEBUG_INFO, "Support(): supported on %p\n", Controller));\r
 \r
 Done:\r
   gBS->CloseProtocol (\r
@@ -271,7 +271,7 @@ SimpleNetworkDriverStart (
   BOOLEAN                                   FoundIoBar;\r
   BOOLEAN                                   FoundMemoryBar;\r
 \r
-  DEBUG ((EFI_D_NET, "\nSnpNotifyNetworkInterfaceIdentifier()  "));\r
+  DEBUG ((DEBUG_NET, "\nSnpNotifyNetworkInterfaceIdentifier()  "));\r
 \r
   Status = gBS->OpenProtocol (\r
                   Controller,\r
@@ -328,12 +328,12 @@ SimpleNetworkDriverStart (
     return Status;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "Start(): UNDI3.1 found\n"));\r
+  DEBUG ((DEBUG_INFO, "Start(): UNDI3.1 found\n"));\r
 \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 ((DEBUG_NET, "\n!PXE checksum is not correct.\n"));\r
     goto NiiError;\r
   }\r
 \r
@@ -348,7 +348,7 @@ SimpleNetworkDriverStart (
     //  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 ((DEBUG_NET, "\nUNDI does not have promiscuous or broadcast support."));\r
     goto NiiError;\r
   }\r
   //\r
@@ -365,7 +365,7 @@ SimpleNetworkDriverStart (
                     );\r
 \r
   if (Status != EFI_SUCCESS) {\r
-    DEBUG ((EFI_D_NET, "\nCould not allocate SNP_DRIVER structure.\n"));\r
+    DEBUG ((DEBUG_NET, "\nCould not allocate SNP_DRIVER structure.\n"));\r
     goto NiiError;\r
   }\r
 \r
@@ -452,7 +452,7 @@ SimpleNetworkDriverStart (
                     );\r
 \r
   if (Status != EFI_SUCCESS) {\r
-    DEBUG ((EFI_D_NET, "\nCould not allocate CPB and DB structures.\n"));\r
+    DEBUG ((DEBUG_NET, "\nCould not allocate CPB and DB structures.\n"));\r
     goto Error_DeleteSNP;\r
   }\r
 \r
@@ -466,8 +466,8 @@ SimpleNetworkDriverStart (
   // the IO BAR.  Save the index of the BAR into the adapter info structure.\r
   // for regular 32bit BARs, 0 is memory mapped, 1 is io mapped\r
   //\r
-  Snp->MemoryBarIndex = 0;\r
-  Snp->IoBarIndex     = 1;\r
+  Snp->MemoryBarIndex = PCI_MAX_BAR;\r
+  Snp->IoBarIndex     = PCI_MAX_BAR;\r
   FoundMemoryBar      = FALSE;\r
   FoundIoBar          = FALSE;\r
   for (BarIndex = 0; BarIndex < PCI_MAX_BAR; BarIndex++) {\r
@@ -519,7 +519,7 @@ SimpleNetworkDriverStart (
   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 ((DEBUG_NET, "\nSnp->undi.get_init_info()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -529,7 +529,7 @@ SimpleNetworkDriverStart (
   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 ((DEBUG_NET, "\nSnp->undi.init_info()  %xh:%xh\n", Snp->Cdb.StatFlags, Snp->Cdb.StatCode));\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r
   }\r
@@ -627,7 +627,7 @@ SimpleNetworkDriverStart (
   Status = PxeGetStnAddr (Snp);\r
 \r
   if (Status != EFI_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR, "\nSnp->undi.get_station_addr() failed.\n"));\r
+    DEBUG ((DEBUG_ERROR, "\nSnp->undi.get_station_addr() failed.\n"));\r
     PxeShutdown (Snp);\r
     PxeStop (Snp);\r
     goto Error_DeleteSNP;\r