MdeModulePkg: Change use of EFI_D_* to DEBUG_*

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael D Kinney
2021-11-16 19:21:29 -08:00
committed by mergify[bot]
parent 917e98f3e5
commit 87000d7708
146 changed files with 1560 additions and 1619 deletions

View File

@@ -58,7 +58,7 @@ UsbBootRequestSense (
&CmdResult
);
if (EFI_ERROR (Status) || CmdResult != USB_MASS_CMD_SUCCESS) {
DEBUG ((EFI_D_ERROR, "UsbBootRequestSense: (%r) CmdResult=0x%x\n", Status, CmdResult));
DEBUG ((DEBUG_ERROR, "UsbBootRequestSense: (%r) CmdResult=0x%x\n", Status, CmdResult));
if (!EFI_ERROR (Status)) {
Status = EFI_DEVICE_ERROR;
}
@@ -131,7 +131,7 @@ UsbBootRequestSense (
break;
}
DEBUG ((EFI_D_INFO, "UsbBootRequestSense: (%r) with error code (%x) sense key %x/%x/%x\n",
DEBUG ((DEBUG_INFO, "UsbBootRequestSense: (%r) with error code (%x) sense key %x/%x/%x\n",
Status,
SenseData.ErrorCode,
USB_BOOT_SENSE_KEY (SenseData.SenseKey),
@@ -191,7 +191,7 @@ UsbBootExecCmd (
);
if (Status == EFI_TIMEOUT) {
DEBUG ((EFI_D_ERROR, "UsbBootExecCmd: %r to Exec 0x%x Cmd\n", Status, *(UINT8 *)Cmd));
DEBUG ((DEBUG_ERROR, "UsbBootExecCmd: %r to Exec 0x%x Cmd\n", Status, *(UINT8 *)Cmd));
return EFI_TIMEOUT;
}
@@ -206,7 +206,7 @@ UsbBootExecCmd (
//
// If command execution failed, then retrieve error info via sense request.
//
DEBUG ((EFI_D_ERROR, "UsbBootExecCmd: %r to Exec 0x%x Cmd (Result = %x)\n", Status, *(UINT8 *)Cmd, CmdResult));
DEBUG ((DEBUG_ERROR, "UsbBootExecCmd: %r to Exec 0x%x Cmd (Result = %x)\n", Status, *(UINT8 *)Cmd, CmdResult));
return UsbBootRequestSense (UsbMass);
}
@@ -631,7 +631,7 @@ UsbBootGetParams (
Status = UsbBootInquiry (UsbMass);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBootGetParams: UsbBootInquiry (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBootGetParams: UsbBootInquiry (%r)\n", Status));
return Status;
}
@@ -643,7 +643,7 @@ UsbBootGetParams (
(UsbMass->Pdt != USB_PDT_CDROM) &&
(UsbMass->Pdt != USB_PDT_OPTICAL) &&
(UsbMass->Pdt != USB_PDT_SIMPLE_DIRECT)) {
DEBUG ((EFI_D_ERROR, "UsbBootGetParams: Found an unsupported peripheral type[%d]\n", UsbMass->Pdt));
DEBUG ((DEBUG_ERROR, "UsbBootGetParams: Found an unsupported peripheral type[%d]\n", UsbMass->Pdt));
return EFI_UNSUPPORTED;
}
@@ -695,7 +695,7 @@ UsbBootDetectMedia (
Status = UsbBootIsUnitReady (UsbMass);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBootDetectMedia: UsbBootIsUnitReady (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBootDetectMedia: UsbBootIsUnitReady (%r)\n", Status));
}
//
@@ -719,7 +719,7 @@ UsbBootDetectMedia (
Status = UsbBootReadCapacity (UsbMass);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBootDetectMedia: UsbBootReadCapacity (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBootDetectMedia: UsbBootReadCapacity (%r)\n", Status));
}
}

View File

@@ -266,13 +266,13 @@ UsbBotDataTransfer (
);
if (EFI_ERROR (Status)) {
if (USB_IS_ERROR (Result, EFI_USB_ERR_STALL)) {
DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: (%r)\n", Status));
DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: DataIn Stall\n"));
DEBUG ((DEBUG_INFO, "UsbBotDataTransfer: (%r)\n", Status));
DEBUG ((DEBUG_INFO, "UsbBotDataTransfer: DataIn Stall\n"));
UsbClearEndpointStall (UsbBot->UsbIo, Endpoint->EndpointAddress);
} else if (USB_IS_ERROR (Result, EFI_USB_ERR_NAK)) {
Status = EFI_NOT_READY;
} else {
DEBUG ((EFI_D_ERROR, "UsbBotDataTransfer: (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBotDataTransfer: (%r)\n", Status));
}
if(Status == EFI_TIMEOUT){
UsbBotResetDevice(UsbBot, FALSE);
@@ -416,7 +416,7 @@ UsbBotExecCommand (
//
Status = UsbBotSendCommand (UsbBot, Cmd, CmdLen, DataDir, DataLen, Lun);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBotExecCommand: UsbBotSendCommand (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBotExecCommand: UsbBotSendCommand (%r)\n", Status));
return Status;
}
@@ -433,7 +433,7 @@ UsbBotExecCommand (
//
Status = UsbBotGetStatus (UsbBot, DataLen, &Result);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBotExecCommand: UsbBotGetStatus (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBotExecCommand: UsbBotGetStatus (%r)\n", Status));
return Status;
}
@@ -604,4 +604,3 @@ UsbBotCleanUp (
FreePool (Context);
return EFI_SUCCESS;
}

View File

@@ -451,7 +451,7 @@ UsbCbiExecCommand (
Status = UsbCbiSendCommand (UsbCbi, Cmd, CmdLen, Timeout);
if (EFI_ERROR (Status)) {
gBS->Stall(10 * USB_MASS_1_MILLISECOND);
DEBUG ((EFI_D_ERROR, "UsbCbiExecCommand: UsbCbiSendCommand (%r)\n",Status));
DEBUG ((DEBUG_ERROR, "UsbCbiExecCommand: UsbCbiSendCommand (%r)\n",Status));
return Status;
}
@@ -463,7 +463,7 @@ UsbCbiExecCommand (
Status = UsbCbiDataTransfer (UsbCbi, DataDir, Data, &TransLen, Timeout);
if (UsbCbi->InterruptEndpoint == NULL) {
DEBUG ((EFI_D_ERROR, "UsbCbiExecCommand: UsbCbiDataTransfer (%r)\n",Status));
DEBUG ((DEBUG_ERROR, "UsbCbiExecCommand: UsbCbiDataTransfer (%r)\n",Status));
return Status;
}
@@ -472,7 +472,7 @@ UsbCbiExecCommand (
//
Status = UsbCbiGetStatus (UsbCbi, Timeout, &Result);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbCbiExecCommand: UsbCbiGetStatus (%r)\n",Status));
DEBUG ((DEBUG_ERROR, "UsbCbiExecCommand: UsbCbiGetStatus (%r)\n",Status));
return Status;
}

View File

@@ -172,7 +172,7 @@ UsbMassReadBlocks (
}
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbMassReadBlocks: UsbBootReadBlocks (%r) -> Reset\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassReadBlocks: UsbBootReadBlocks (%r) -> Reset\n", Status));
UsbMassReset (This, TRUE);
}
@@ -292,7 +292,7 @@ UsbMassWriteBlocks (
}
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbMassWriteBlocks: UsbBootWriteBlocks (%r) -> Reset\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassWriteBlocks: UsbBootWriteBlocks (%r) -> Reset\n", Status));
UsbMassReset (This, TRUE);
}
@@ -491,7 +491,7 @@ UsbMassInitMultiLun (
for (Index = 0; Index <= MaxLun; Index++) {
DEBUG ((EFI_D_INFO, "UsbMassInitMultiLun: Start to initialize No.%d logic unit\n", Index));
DEBUG ((DEBUG_INFO, "UsbMassInitMultiLun: Start to initialize No.%d logic unit\n", Index));
UsbIo = NULL;
UsbMass = AllocateZeroPool (sizeof (USB_MASS_DEVICE));
@@ -514,7 +514,7 @@ UsbMassInitMultiLun (
//
Status = UsbMassInitMedia (UsbMass);
if ((EFI_ERROR (Status)) && (Status != EFI_NO_MEDIA)) {
DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: UsbMassInitMedia (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassInitMultiLun: UsbMassInitMedia (%r)\n", Status));
FreePool (UsbMass);
continue;
}
@@ -531,7 +531,7 @@ UsbMassInitMultiLun (
UsbMass->DevicePath = AppendDevicePathNode (DevicePath, &LunNode.Header);
if (UsbMass->DevicePath == NULL) {
DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: failed to create device logic unit device path\n"));
DEBUG ((DEBUG_ERROR, "UsbMassInitMultiLun: failed to create device logic unit device path\n"));
Status = EFI_OUT_OF_RESOURCES;
FreePool (UsbMass);
continue;
@@ -554,7 +554,7 @@ UsbMassInitMultiLun (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: InstallMultipleProtocolInterfaces (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassInitMultiLun: InstallMultipleProtocolInterfaces (%r)\n", Status));
FreePool (UsbMass->DevicePath);
FreePool (UsbMass);
continue;
@@ -573,7 +573,7 @@ UsbMassInitMultiLun (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: OpenUsbIoProtocol By Child (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassInitMultiLun: OpenUsbIoProtocol By Child (%r)\n", Status));
gBS->UninstallMultipleProtocolInterfaces (
UsbMass->Controller,
&gEfiDevicePathProtocolGuid,
@@ -589,7 +589,7 @@ UsbMassInitMultiLun (
continue;
}
ReturnStatus = EFI_SUCCESS;
DEBUG ((EFI_D_INFO, "UsbMassInitMultiLun: Success to initialize No.%d logic unit\n", Index));
DEBUG ((DEBUG_INFO, "UsbMassInitMultiLun: Success to initialize No.%d logic unit\n", Index));
}
return ReturnStatus;
@@ -633,7 +633,7 @@ UsbMassInitNonLun (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbMassInitNonLun: OpenUsbIoProtocol By Driver (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassInitNonLun: OpenUsbIoProtocol By Driver (%r)\n", Status));
goto ON_ERROR;
}
@@ -654,7 +654,7 @@ UsbMassInitNonLun (
//
Status = UsbMassInitMedia (UsbMass);
if ((EFI_ERROR (Status)) && (Status != EFI_NO_MEDIA)) {
DEBUG ((EFI_D_ERROR, "UsbMassInitNonLun: UsbMassInitMedia (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "UsbMassInitNonLun: UsbMassInitMedia (%r)\n", Status));
goto ON_ERROR;
}
@@ -810,7 +810,7 @@ USBMassDriverBindingStart (
Status = UsbMassInitTransport (This, Controller, &Transport, &Context, &MaxLun);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: UsbMassInitTransport (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "USBMassDriverBindingStart: UsbMassInitTransport (%r)\n", Status));
goto Exit;
}
if (MaxLun == 0) {
@@ -819,7 +819,7 @@ USBMassDriverBindingStart (
//
Status = UsbMassInitNonLun (This, Controller, Transport, Context);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: UsbMassInitNonLun (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "USBMassDriverBindingStart: UsbMassInitNonLun (%r)\n", Status));
}
} else {
//
@@ -835,7 +835,7 @@ USBMassDriverBindingStart (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: OpenDevicePathProtocol By Driver (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "USBMassDriverBindingStart: OpenDevicePathProtocol By Driver (%r)\n", Status));
goto Exit;
}
@@ -849,7 +849,7 @@ USBMassDriverBindingStart (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: OpenUsbIoProtocol By Driver (%r)\n", Status));
DEBUG ((DEBUG_ERROR, "USBMassDriverBindingStart: OpenUsbIoProtocol By Driver (%r)\n", Status));
gBS->CloseProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
@@ -877,7 +877,7 @@ USBMassDriverBindingStart (
This->DriverBindingHandle,
Controller
);
DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: UsbMassInitMultiLun (%r) with Maxlun=%d\n", Status, MaxLun));
DEBUG ((DEBUG_ERROR, "USBMassDriverBindingStart: UsbMassInitMultiLun (%r) with Maxlun=%d\n", Status, MaxLun));
}
}
Exit:
@@ -953,7 +953,7 @@ USBMassDriverBindingStop (
This->DriverBindingHandle,
Controller
);
DEBUG ((EFI_D_INFO, "Success to stop multi-lun root handle\n"));
DEBUG ((DEBUG_INFO, "Success to stop multi-lun root handle\n"));
return EFI_SUCCESS;
}
@@ -989,7 +989,7 @@ USBMassDriverBindingStop (
UsbMass->Transport->CleanUp (UsbMass->Context);
FreePool (UsbMass);
DEBUG ((EFI_D_INFO, "Success to stop non-multi-lun root handle\n"));
DEBUG ((DEBUG_INFO, "Success to stop non-multi-lun root handle\n"));
return EFI_SUCCESS;
}
@@ -1012,7 +1012,7 @@ USBMassDriverBindingStop (
);
if (EFI_ERROR (Status)) {
AllChildrenStopped = FALSE;
DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when opening blockio\n", (UINT32)Index));
DEBUG ((DEBUG_ERROR, "Fail to stop No.%d multi-lun child handle when opening blockio\n", (UINT32)Index));
continue;
}
@@ -1041,7 +1041,7 @@ USBMassDriverBindingStop (
// Fail to uninstall Block I/O Protocol and Device Path Protocol, so re-open USB I/O Protocol by child.
//
AllChildrenStopped = FALSE;
DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when uninstalling blockio and devicepath\n", (UINT32)Index));
DEBUG ((DEBUG_ERROR, "Fail to stop No.%d multi-lun child handle when uninstalling blockio and devicepath\n", (UINT32)Index));
gBS->OpenProtocol (
Controller,
@@ -1066,7 +1066,7 @@ USBMassDriverBindingStop (
return EFI_DEVICE_ERROR;
}
DEBUG ((EFI_D_INFO, "Success to stop all %d multi-lun children handles\n", (UINT32) NumberOfChildren));
DEBUG ((DEBUG_INFO, "Success to stop all %d multi-lun children handles\n", (UINT32) NumberOfChildren));
return EFI_SUCCESS;
}