]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/XenPvBlkDxe/BlockFront.c
OvmfPkg: replace old EFI_D_ debug levels with new DEBUG_ ones
[mirror_edk2.git] / OvmfPkg / XenPvBlkDxe / BlockFront.c
index f57f8573156843260d86cbe8b0f34df88d44c545..122a6baed25a637668a53b7dd029a6ac48a40dc3 100644 (file)
@@ -123,7 +123,7 @@ XenPvBlkWaitForBackendState (
       Status = XENSTORE_STATUS_FAIL;\r
       break;\r
     }\r
-    DEBUG ((EFI_D_INFO,\r
+    DEBUG ((DEBUG_INFO,\r
             "XenPvBlk: waiting backend state %d, current: %d\n",\r
             ExpectedState, State));\r
     XenBusIo->WaitForWatch (XenBusIo, Dev->StateWatchToken);\r
@@ -171,12 +171,12 @@ XenPvBlockFrontInitialization (
   if (Dev->MediaInfo.CdRom) {\r
     Status = XenBusIo->XsBackendRead (XenBusIo, XST_NIL, "params", (VOID**)&Params);\r
     if (Status != XENSTORE_STATUS_SUCCESS) {\r
-      DEBUG ((EFI_D_ERROR, "%a: Failed to read params (%d)\n", __FUNCTION__, Status));\r
+      DEBUG ((DEBUG_ERROR, "%a: Failed to read params (%d)\n", __FUNCTION__, Status));\r
       goto Error;\r
     }\r
     if (AsciiStrLen (Params) == 0 || AsciiStrCmp (Params, "aio:") == 0) {\r
       FreePool (Params);\r
-      DEBUG ((EFI_D_INFO, "%a: Empty cdrom\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_INFO, "%a: Empty cdrom\n", __FUNCTION__));\r
       goto Error;\r
     }\r
     FreePool (Params);\r
@@ -184,7 +184,7 @@ XenPvBlockFrontInitialization (
 \r
   Status = XenBusReadUint64 (XenBusIo, "backend-id", FALSE, &Value);\r
   if (Status != XENSTORE_STATUS_SUCCESS || Value > MAX_UINT16) {\r
-    DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to get backend-id (%d)\n",\r
+    DEBUG ((DEBUG_ERROR, "XenPvBlk: Failed to get backend-id (%d)\n",\r
             Status));\r
     goto Error;\r
   }\r
@@ -203,32 +203,32 @@ XenPvBlockFrontInitialization (
 Again:\r
   Status = XenBusIo->XsTransactionStart (XenBusIo, &Transaction);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_WARN, "XenPvBlk: Failed to start transaction, %d\n", Status));\r
+    DEBUG ((DEBUG_WARN, "XenPvBlk: Failed to start transaction, %d\n", Status));\r
     goto Error;\r
   }\r
 \r
   Status = XenBusIo->XsPrintf (XenBusIo, &Transaction, NodeName, "ring-ref", "%d",\r
                                Dev->RingRef);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write ring-ref.\n"));\r
+    DEBUG ((DEBUG_ERROR, "XenPvBlk: Failed to write ring-ref.\n"));\r
     goto AbortTransaction;\r
   }\r
   Status = XenBusIo->XsPrintf (XenBusIo, &Transaction, NodeName,\r
                                "event-channel", "%d", Dev->EventChannel);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write event-channel.\n"));\r
+    DEBUG ((DEBUG_ERROR, "XenPvBlk: Failed to write event-channel.\n"));\r
     goto AbortTransaction;\r
   }\r
   Status = XenBusIo->XsPrintf (XenBusIo, &Transaction, NodeName,\r
                                "protocol", "%a", XEN_IO_PROTO_ABI_NATIVE);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to write protocol.\n"));\r
+    DEBUG ((DEBUG_ERROR, "XenPvBlk: Failed to write protocol.\n"));\r
     goto AbortTransaction;\r
   }\r
 \r
   Status = XenBusIo->SetState (XenBusIo, &Transaction, XenbusStateConnected);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR, "XenPvBlk: Failed to switch state.\n"));\r
+    DEBUG ((DEBUG_ERROR, "XenPvBlk: Failed to switch state.\n"));\r
     goto AbortTransaction;\r
   }\r
 \r
@@ -244,7 +244,7 @@ Again:
   //\r
   Status = XenPvBlkWaitForBackendState (Dev, XenbusStateConnected, &State);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR,\r
+    DEBUG ((DEBUG_ERROR,\r
             "XenPvBlk: backend for %a/%d not available, rc=%d state=%d\n",\r
             XenBusIo->Type, XenBusIo->DeviceId, Status, State));\r
     goto Error2;\r
@@ -274,7 +274,7 @@ Again:
     //\r
     // This is not supported by the driver.\r
     //\r
-    DEBUG ((EFI_D_ERROR, "XenPvBlk: Unsupported sector-size value %Lu, "\r
+    DEBUG ((DEBUG_ERROR, "XenPvBlk: Unsupported sector-size value %Lu, "\r
             "it must be a multiple of 512\n", Value));\r
     goto Error2;\r
   }\r
@@ -298,7 +298,7 @@ Again:
     Dev->MediaInfo.FeatureFlushCache = FALSE;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "XenPvBlk: New disk with %ld sectors of %d bytes\n",\r
+  DEBUG ((DEBUG_INFO, "XenPvBlk: New disk with %ld sectors of %d bytes\n",\r
           Dev->MediaInfo.Sectors, Dev->MediaInfo.SectorSize));\r
 \r
   *DevPtr = Dev;\r
@@ -330,7 +330,7 @@ XenPvBlockFrontShutdown (
 \r
   Status = XenBusIo->SetState (XenBusIo, XST_NIL, XenbusStateClosing);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR,\r
+    DEBUG ((DEBUG_ERROR,\r
             "XenPvBlk: error while changing state to Closing: %d\n",\r
             Status));\r
     goto Close;\r
@@ -338,7 +338,7 @@ XenPvBlockFrontShutdown (
 \r
   Status = XenPvBlkWaitForBackendState (Dev, XenbusStateClosing, NULL);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR,\r
+    DEBUG ((DEBUG_ERROR,\r
             "XenPvBlk: error while waiting for closing backend state: %d\n",\r
             Status));\r
     goto Close;\r
@@ -346,7 +346,7 @@ XenPvBlockFrontShutdown (
 \r
   Status = XenBusIo->SetState (XenBusIo, XST_NIL, XenbusStateClosed);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR,\r
+    DEBUG ((DEBUG_ERROR,\r
             "XenPvBlk: error while changing state to Closed: %d\n",\r
             Status));\r
     goto Close;\r
@@ -354,7 +354,7 @@ XenPvBlockFrontShutdown (
 \r
   Status = XenPvBlkWaitForBackendState (Dev, XenbusStateClosed, NULL);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR,\r
+    DEBUG ((DEBUG_ERROR,\r
             "XenPvBlk: error while waiting for closed backend state: %d\n",\r
             Status));\r
     goto Close;\r
@@ -362,7 +362,7 @@ XenPvBlockFrontShutdown (
 \r
   Status = XenBusIo->SetState (XenBusIo, XST_NIL, XenbusStateInitialising);\r
   if (Status != XENSTORE_STATUS_SUCCESS) {\r
-    DEBUG ((EFI_D_ERROR,\r
+    DEBUG ((DEBUG_ERROR,\r
             "XenPvBlk: error while changing state to initialising: %d\n",\r
             Status));\r
     goto Close;\r
@@ -371,7 +371,7 @@ XenPvBlockFrontShutdown (
   while (TRUE) {\r
     Status = XenBusReadUint64 (XenBusIo, "state", TRUE, &Value);\r
     if (Status != XENSTORE_STATUS_SUCCESS) {\r
-      DEBUG ((EFI_D_ERROR,\r
+      DEBUG ((DEBUG_ERROR,\r
               "XenPvBlk: error while waiting for new backend state: %d\n",\r
               Status));\r
       goto Close;\r
@@ -379,7 +379,7 @@ XenPvBlockFrontShutdown (
     if (Value <= XenbusStateInitWait || Value >= XenbusStateClosed) {\r
       break;\r
     }\r
-    DEBUG ((EFI_D_INFO,\r
+    DEBUG ((DEBUG_INFO,\r
             "XenPvBlk: waiting backend state %d, current: %Lu\n",\r
             XenbusStateInitWait, Value));\r
     XenBusIo->WaitForWatch (XenBusIo, Dev->StateWatchToken);\r
@@ -473,7 +473,7 @@ XenPvBlockAsyncIo (
     UINT32 ReturnCode;\r
     ReturnCode = XenBusIo->EventChannelNotify (XenBusIo, Dev->EventChannel);\r
     if (ReturnCode != 0) {\r
-      DEBUG ((EFI_D_ERROR,\r
+      DEBUG ((DEBUG_ERROR,\r
               "XenPvBlk: Unexpected return value from EventChannelNotify: %d\n",\r
               ReturnCode));\r
     }\r
@@ -528,7 +528,7 @@ XenPvBlockPushOperation (
     UINT32 ReturnCode;\r
     ReturnCode = XenBusIo->EventChannelNotify (XenBusIo, Dev->EventChannel);\r
     if (ReturnCode != 0) {\r
-      DEBUG ((EFI_D_ERROR,\r
+      DEBUG ((DEBUG_ERROR,\r
               "XenPvBlk: Unexpected return value from EventChannelNotify: %d\n",\r
               ReturnCode));\r
     }\r
@@ -590,7 +590,7 @@ XenPvBlockAsyncIoPoll (
           INT32 Index;\r
 \r
           if (Status != BLKIF_RSP_OKAY) {\r
-            DEBUG ((EFI_D_ERROR,\r
+            DEBUG ((DEBUG_ERROR,\r
                     "XenPvBlk: "\r
                     "%a error %d on %a at sector %Lx, num bytes %Lx\n",\r
                     Response->operation == BLKIF_OP_READ ? "read" : "write",\r
@@ -608,17 +608,17 @@ XenPvBlockAsyncIoPoll (
 \r
       case BLKIF_OP_WRITE_BARRIER:\r
         if (Status != BLKIF_RSP_OKAY) {\r
-          DEBUG ((EFI_D_ERROR, "XenPvBlk: write barrier error %d\n", Status));\r
+          DEBUG ((DEBUG_ERROR, "XenPvBlk: write barrier error %d\n", Status));\r
         }\r
         break;\r
       case BLKIF_OP_FLUSH_DISKCACHE:\r
         if (Status != BLKIF_RSP_OKAY) {\r
-          DEBUG ((EFI_D_ERROR, "XenPvBlk: flush error %d\n", Status));\r
+          DEBUG ((DEBUG_ERROR, "XenPvBlk: flush error %d\n", Status));\r
         }\r
         break;\r
 \r
       default:\r
-        DEBUG ((EFI_D_ERROR,\r
+        DEBUG ((DEBUG_ERROR,\r
                 "XenPvBlk: unrecognized block operation %d response (status %d)\n",\r
                 Response->operation, Status));\r
         break;\r