MdeModulePkg/UfsPassThruDxe: Replace 'EFI_D_XXX' with 'DEBUG_XXX'

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Hao Wu 2017-03-21 13:33:04 +08:00
parent f1894fa294
commit edd94e74c8
2 changed files with 48 additions and 48 deletions

View File

@ -1,6 +1,6 @@
/** @file /** @file
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR> Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -784,7 +784,7 @@ UfsPassThruDriverBindingStart (
Private = NULL; Private = NULL;
UfsHcBase = 0; UfsHcBase = 0;
DEBUG ((EFI_D_INFO, "==UfsPassThru Start== Controller = %x\n", Controller)); DEBUG ((DEBUG_INFO, "==UfsPassThru Start== Controller = %x\n", Controller));
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Controller, Controller,
@ -796,7 +796,7 @@ UfsPassThruDriverBindingStart (
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Open Ufs Host Controller Protocol Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Open Ufs Host Controller Protocol Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -805,7 +805,7 @@ UfsPassThruDriverBindingStart (
// //
Status = UfsHc->GetUfsHcMmioBar (UfsHc, &UfsHcBase); Status = UfsHc->GetUfsHcMmioBar (UfsHc, &UfsHcBase);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Get Ufs Host Controller Mmio Bar Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Get Ufs Host Controller Mmio Bar Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -814,7 +814,7 @@ UfsPassThruDriverBindingStart (
// //
Private = AllocateCopyPool (sizeof (UFS_PASS_THRU_PRIVATE_DATA), &gUfsPassThruTemplate); Private = AllocateCopyPool (sizeof (UFS_PASS_THRU_PRIVATE_DATA), &gUfsPassThruTemplate);
if (Private == NULL) { if (Private == NULL) {
DEBUG ((EFI_D_ERROR, "Unable to allocate Ufs Pass Thru private data\n")); DEBUG ((DEBUG_ERROR, "Unable to allocate Ufs Pass Thru private data\n"));
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto Error; goto Error;
} }
@ -829,7 +829,7 @@ UfsPassThruDriverBindingStart (
// //
Status = UfsControllerInit (Private); Status = UfsControllerInit (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Ufs Host Controller Initialization Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Ufs Host Controller Initialization Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -840,7 +840,7 @@ UfsPassThruDriverBindingStart (
// //
Status = UfsExecNopCmds (Private); Status = UfsExecNopCmds (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Ufs Sending NOP IN command Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Ufs Sending NOP IN command Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -849,7 +849,7 @@ UfsPassThruDriverBindingStart (
// //
Status = UfsSetFlag (Private, UfsFlagDevInit); Status = UfsSetFlag (Private, UfsFlagDevInit);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Ufs Set fDeviceInit Flag Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Ufs Set fDeviceInit Flag Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -858,7 +858,7 @@ UfsPassThruDriverBindingStart (
// //
Status = UfsRwDeviceDesc (Private, TRUE, UfsConfigDesc, 0, 0, &Config, sizeof (UFS_CONFIG_DESC)); Status = UfsRwDeviceDesc (Private, TRUE, UfsConfigDesc, 0, 0, &Config, sizeof (UFS_CONFIG_DESC));
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Ufs Get Configuration Descriptor Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Ufs Get Configuration Descriptor Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -869,7 +869,7 @@ UfsPassThruDriverBindingStart (
for (Index = 0; Index < 8; Index++) { for (Index = 0; Index < 8; Index++) {
if (Config.UnitDescConfParams[Index].LunEn != 0) { if (Config.UnitDescConfParams[Index].LunEn != 0) {
Private->Luns.BitMask |= (BIT0 << Index); Private->Luns.BitMask |= (BIT0 << Index);
DEBUG ((EFI_D_INFO, "Ufs Lun %d is enabled\n", Index)); DEBUG ((DEBUG_INFO, "Ufs Lun %d is enabled\n", Index));
} }
} }
@ -884,7 +884,7 @@ UfsPassThruDriverBindingStart (
&Private->TimerEvent &Private->TimerEvent
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Ufs Create Async Tasks Event Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Ufs Create Async Tasks Event Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -894,7 +894,7 @@ UfsPassThruDriverBindingStart (
UFS_HC_ASYNC_TIMER UFS_HC_ASYNC_TIMER
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Ufs Set Periodic Timer Error, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "Ufs Set Periodic Timer Error, Status = %r\n", Status));
goto Error; goto Error;
} }
@ -986,7 +986,7 @@ UfsPassThruDriverBindingStop (
LIST_ENTRY *Entry; LIST_ENTRY *Entry;
LIST_ENTRY *NextEntry; LIST_ENTRY *NextEntry;
DEBUG ((EFI_D_INFO, "==UfsPassThru Stop== Controller Controller = %x\n", Controller)); DEBUG ((DEBUG_INFO, "==UfsPassThru Stop== Controller Controller = %x\n", Controller));
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Controller, Controller,

View File

@ -157,34 +157,34 @@ DumpUicCmdExecResult (
case 0x00: case 0x00:
break; break;
case 0x01: case 0x01:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE\n"));
break; break;
case 0x02: case 0x02:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE_VALUE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE_VALUE\n"));
break; break;
case 0x03: case 0x03:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - READ_ONLY_MIB_ATTRIBUTE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - READ_ONLY_MIB_ATTRIBUTE\n"));
break; break;
case 0x04: case 0x04:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - WRITE_ONLY_MIB_ATTRIBUTE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - WRITE_ONLY_MIB_ATTRIBUTE\n"));
break; break;
case 0x05: case 0x05:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BAD_INDEX\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BAD_INDEX\n"));
break; break;
case 0x06: case 0x06:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - LOCKED_MIB_ATTRIBUTE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - LOCKED_MIB_ATTRIBUTE\n"));
break; break;
case 0x07: case 0x07:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BAD_TEST_FEATURE_INDEX\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BAD_TEST_FEATURE_INDEX\n"));
break; break;
case 0x08: case 0x08:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n"));
break; break;
case 0x09: case 0x09:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BUSY\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BUSY\n"));
break; break;
case 0x0A: case 0x0A:
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - DME_FAILURE\n")); DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - DME_FAILURE\n"));
break; break;
default : default :
ASSERT (FALSE); ASSERT (FALSE);
@ -195,7 +195,7 @@ DumpUicCmdExecResult (
case 0x00: case 0x00:
break; break;
case 0x01: case 0x01:
DEBUG ((EFI_D_VERBOSE, "UIC control command fails - FAILURE\n")); DEBUG ((DEBUG_VERBOSE, "UIC control command fails - FAILURE\n"));
break; break;
default : default :
ASSERT (FALSE); ASSERT (FALSE);
@ -217,34 +217,34 @@ DumpQueryResponseResult (
{ {
switch (Result) { switch (Result) {
case 0xF6: case 0xF6:
DEBUG ((EFI_D_VERBOSE, "Query Response with Parameter Not Readable\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Parameter Not Readable\n"));
break; break;
case 0xF7: case 0xF7:
DEBUG ((EFI_D_VERBOSE, "Query Response with Parameter Not Writeable\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Parameter Not Writeable\n"));
break; break;
case 0xF8: case 0xF8:
DEBUG ((EFI_D_VERBOSE, "Query Response with Parameter Already Written\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Parameter Already Written\n"));
break; break;
case 0xF9: case 0xF9:
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Length\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Length\n"));
break; break;
case 0xFA: case 0xFA:
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Value\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Value\n"));
break; break;
case 0xFB: case 0xFB:
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Selector\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Selector\n"));
break; break;
case 0xFC: case 0xFC:
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Index\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Index\n"));
break; break;
case 0xFD: case 0xFD:
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Idn\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Idn\n"));
break; break;
case 0xFE: case 0xFE:
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Opcode\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Opcode\n"));
break; break;
case 0xFF: case 0xFF:
DEBUG ((EFI_D_VERBOSE, "Query Response with General Failure\n")); DEBUG ((DEBUG_VERBOSE, "Query Response with General Failure\n"));
break; break;
default : default :
ASSERT (FALSE); ASSERT (FALSE);
@ -402,7 +402,7 @@ UfsInitUtpPrdt (
if ((BufferSize & (BIT0 | BIT1)) != 0) { if ((BufferSize & (BIT0 | BIT1)) != 0) {
BufferSize &= ~(BIT0 | BIT1); BufferSize &= ~(BIT0 | BIT1);
DEBUG ((EFI_D_WARN, "UfsInitUtpPrdt: The BufferSize [%d] is not dword-aligned!\n", BufferSize)); DEBUG ((DEBUG_WARN, "UfsInitUtpPrdt: The BufferSize [%d] is not dword-aligned!\n", BufferSize));
} }
if (BufferSize == 0) { if (BufferSize == 0) {
@ -1559,7 +1559,7 @@ UfsExecScsiCmds (
// //
Packet->TargetStatus = Response->Status; Packet->TargetStatus = Response->Status;
if (Response->Response != 0) { if (Response->Response != 0) {
DEBUG ((EFI_D_ERROR, "UfsExecScsiCmds() fails with Target Failure\n")); DEBUG ((DEBUG_ERROR, "UfsExecScsiCmds() fails with Target Failure\n"));
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
goto Exit; goto Exit;
} }
@ -1717,7 +1717,7 @@ UfsExecUicCommands (
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
DEBUG ((EFI_D_INFO, "UfsPassThruDxe: found a attached UFS device\n")); DEBUG ((DEBUG_INFO, "UfsPassThruDxe: found a attached UFS device\n"));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -2084,29 +2084,29 @@ UfsControllerInit (
Status = UfsEnableHostController (Private); Status = UfsEnableHostController (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Enable Host Controller Fails, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "UfsControllerInit: Enable Host Controller Fails, Status = %r\n", Status));
return Status; return Status;
} }
Status = UfsDeviceDetection (Private); Status = UfsDeviceDetection (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Device Detection Fails, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "UfsControllerInit: Device Detection Fails, Status = %r\n", Status));
return Status; return Status;
} }
Status = UfsInitTaskManagementRequestList (Private); Status = UfsInitTaskManagementRequestList (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Task management list initialization Fails, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "UfsControllerInit: Task management list initialization Fails, Status = %r\n", Status));
return Status; return Status;
} }
Status = UfsInitTransferRequestList (Private); Status = UfsInitTransferRequestList (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Transfer list initialization Fails, Status = %r\n", Status)); DEBUG ((DEBUG_ERROR, "UfsControllerInit: Transfer list initialization Fails, Status = %r\n", Status));
return Status; return Status;
} }
DEBUG ((EFI_D_INFO, "UfsControllerInit Finished\n")); DEBUG ((DEBUG_INFO, "UfsControllerInit Finished\n"));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -2167,7 +2167,7 @@ UfsControllerStop (
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
DEBUG ((EFI_D_INFO, "UfsController is stopped\n")); DEBUG ((DEBUG_INFO, "UfsController is stopped\n"));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -2274,7 +2274,7 @@ ProcessAsyncTaskList (
// case. // case.
// //
Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR; Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR;
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p UfsMmioRead32() Error.\n", TransReq->CallerEvent)); DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p UfsMmioRead32() Error.\n", TransReq->CallerEvent));
SignalCallerEvent (Private, TransReq); SignalCallerEvent (Private, TransReq);
continue; continue;
} }
@ -2291,7 +2291,7 @@ ProcessAsyncTaskList (
// Timeout occurs. // Timeout occurs.
// //
Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND; Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND;
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p EFI_TIMEOUT.\n", TransReq->CallerEvent)); DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p EFI_TIMEOUT.\n", TransReq->CallerEvent));
SignalCallerEvent (Private, TransReq); SignalCallerEvent (Private, TransReq);
continue; continue;
} }
@ -2316,7 +2316,7 @@ ProcessAsyncTaskList (
// //
Packet->TargetStatus = Response->Status; Packet->TargetStatus = Response->Status;
if (Response->Response != 0) { if (Response->Response != 0) {
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Failure.\n", TransReq->CallerEvent)); DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Failure.\n", TransReq->CallerEvent));
SignalCallerEvent (Private, TransReq); SignalCallerEvent (Private, TransReq);
continue; continue;
} }
@ -2336,12 +2336,12 @@ ProcessAsyncTaskList (
} }
} }
} else { } else {
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Device Error.\n", TransReq->CallerEvent)); DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Device Error.\n", TransReq->CallerEvent));
SignalCallerEvent (Private, TransReq); SignalCallerEvent (Private, TransReq);
continue; continue;
} }
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Success.\n", TransReq->CallerEvent)); DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Success.\n", TransReq->CallerEvent));
SignalCallerEvent (Private, TransReq); SignalCallerEvent (Private, TransReq);
} }
} }