]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c
Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.
[mirror_edk2.git] / EdkModulePkg / Universal / Network / Snp32_64 / Dxe / callback.c
index 488efc6a0163930135a75506096867fde6451254..6f6ac81d5998a9100d13e6ef867d72cec305831c 100644 (file)
@@ -1,12 +1,12 @@
 /*++\r
-Copyright (c) 2006, 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
-                                                                                          \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
+Copyright (c) 2006, 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
+\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
  callback.c\r
@@ -19,7 +19,7 @@ Abstract:
 --*/\r
 \r
 \r
-#include "snp.h"\r
+#include "Snp.h"\r
 \r
 //\r
 // Global variables\r
@@ -33,7 +33,6 @@ STATIC EFI_LOCK             mLock;
 //\r
 // End Global variables\r
 //\r
-extern EFI_PCI_IO_PROTOCOL  *mPciIoFncs;\r
 \r
 VOID\r
 snp_undi32_callback_v2p_30 (\r
@@ -113,7 +112,7 @@ Returns:
   // created at a lower level (TPL_CALLBACK) it gives an assert!\r
   //\r
   if (mInitializeLock) {\r
-    EfiInitializeLock (&mLock, EFI_TPL_NOTIFY);\r
+    EfiInitializeLock (&mLock, TPL_NOTIFY);\r
     mInitializeLock = FALSE;\r
   }\r
 \r
@@ -182,19 +181,19 @@ Returns:
 \r
   switch (NumBytes) {\r
   case 2:\r
-    Width = 1;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;\r
     break;\r
 \r
   case 4:\r
-    Width = 2;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;\r
     break;\r
 \r
   case 8:\r
-    Width = 3;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;\r
     break;\r
 \r
   default:\r
-    Width = 0;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;\r
   }\r
 \r
   switch (ReadOrWrite) {\r
@@ -344,18 +343,18 @@ Returns:
 \r
   snp   = (SNP_DRIVER *) (UINTN) UniqueId;\r
 \r
-  Width = 0;\r
+  Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;\r
   switch (NumBytes) {\r
   case 2:\r
-    Width = 1;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;\r
     break;\r
 \r
   case 4:\r
-    Width = 2;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;\r
     break;\r
 \r
   case 8:\r
-    Width = 3;\r
+    Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;\r
     break;\r
   }\r
 \r
@@ -483,7 +482,7 @@ Returns:
   }\r
 \r
   if (Index >= MAX_MAP_LENGTH) {\r
-    SNP_PRINT (L"SNP maplist is FULL\n");\r
+    DEBUG ((EFI_D_INFO, "SNP maplist is FULL\n"));\r
     *DevAddrPtr = 0;\r
     return ;\r
   }\r
@@ -547,9 +546,7 @@ Returns:
 \r
   if (Index >= MAX_MAP_LENGTH)\r
   {\r
-#if SNP_DEBUG\r
-    Print (L"SNP could not find a mapping, failed to unmap.\n");\r
-#endif\r
+    DEBUG ((EFI_D_ERROR, "SNP could not find a mapping, failed to unmap.\n"));\r
     return ;\r
   }\r
 \r