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

@@ -168,7 +168,7 @@ UsbIoControlTransfer (
goto ON_EXIT;
}
DEBUG ((EFI_D_INFO, "UsbIoControlTransfer: configure changed!!! Do NOT use old UsbIo!!!\n"));
DEBUG ((DEBUG_INFO, "UsbIoControlTransfer: configure changed!!! Do NOT use old UsbIo!!!\n"));
if (Dev->ActiveConfig != NULL) {
UsbRemoveConfig (Dev);
@@ -837,7 +837,7 @@ UsbIoPortReset (
Status = HubIf->HubApi->ResetPort (HubIf, Dev->ParentPort);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbIoPortReset: failed to reset hub port %d@hub %d, %r \n",
DEBUG (( DEBUG_ERROR, "UsbIoPortReset: failed to reset hub port %d@hub %d, %r \n",
Dev->ParentPort, Dev->ParentAddr, Status));
goto ON_EXIT;
@@ -861,13 +861,13 @@ UsbIoPortReset (
//
// It may fail due to device disconnection or other reasons.
//
DEBUG (( EFI_D_ERROR, "UsbIoPortReset: failed to set address for device %d - %r\n",
DEBUG (( DEBUG_ERROR, "UsbIoPortReset: failed to set address for device %d - %r\n",
Dev->Address, Status));
goto ON_EXIT;
}
DEBUG (( EFI_D_INFO, "UsbIoPortReset: device is now ADDRESSED at %d\n", Dev->Address));
DEBUG (( DEBUG_INFO, "UsbIoPortReset: device is now ADDRESSED at %d\n", Dev->Address));
//
// Reset the current active configure, after this device
@@ -877,7 +877,7 @@ UsbIoPortReset (
Status = UsbSetConfig (Dev, Dev->ActiveConfig->Desc.ConfigurationValue);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbIoPortReset: failed to set configure for device %d - %r\n",
DEBUG (( DEBUG_ERROR, "UsbIoPortReset: failed to set configure for device %d - %r\n",
Dev->Address, Status));
}
}
@@ -934,7 +934,7 @@ UsbBusBuildProtocol (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBusStart: Failed to open device path %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open device path %r\n", Status));
FreePool (UsbBus);
return Status;
@@ -967,7 +967,7 @@ UsbBusBuildProtocol (
);
if (EFI_ERROR (Status) && EFI_ERROR (Status2)) {
DEBUG ((EFI_D_ERROR, "UsbBusStart: Failed to open USB_HC/USB2_HC %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open USB_HC/USB2_HC %r\n", Status));
Status = EFI_DEVICE_ERROR;
goto CLOSE_HC;
@@ -995,7 +995,7 @@ UsbBusBuildProtocol (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBusStart: Failed to install bus protocol %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to install bus protocol %r\n", Status));
goto CLOSE_HC;
}
@@ -1043,13 +1043,13 @@ UsbBusBuildProtocol (
Status = mUsbRootHubApi.Init (RootIf);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbBusStart: Failed to init root hub %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to init root hub %r\n", Status));
goto FREE_ROOTHUB;
}
UsbBus->Devices[0] = RootHub;
DEBUG ((EFI_D_INFO, "UsbBusStart: usb bus started on %p, root hub %p\n", Controller, RootIf));
DEBUG ((DEBUG_INFO, "UsbBusStart: usb bus started on %p, root hub %p\n", Controller, RootIf));
return EFI_SUCCESS;
FREE_ROOTHUB:
@@ -1088,7 +1088,7 @@ CLOSE_HC:
);
FreePool (UsbBus);
DEBUG ((EFI_D_ERROR, "UsbBusStart: Failed to start bus driver %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to start bus driver %r\n", Status));
return Status;
}
@@ -1448,7 +1448,7 @@ UsbBusControllerDriverStop (
return ReturnStatus;
}
DEBUG (( EFI_D_INFO, "UsbBusStop: usb bus stopped on %p\n", Controller));
DEBUG (( DEBUG_INFO, "UsbBusStop: usb bus stopped on %p\n", Controller));
//
// Locate USB_BUS for the current host controller

View File

@@ -272,7 +272,7 @@ UsbParseInterfaceDesc (
Setting = UsbCreateDesc (DescBuf, Len, USB_DESC_TYPE_INTERFACE, &Used);
if (Setting == NULL) {
DEBUG (( EFI_D_ERROR, "UsbParseInterfaceDesc: failed to create interface descriptor\n"));
DEBUG (( DEBUG_ERROR, "UsbParseInterfaceDesc: failed to create interface descriptor\n"));
return NULL;
}
@@ -283,7 +283,7 @@ UsbParseInterfaceDesc (
//
NumEp = Setting->Desc.NumEndpoints;
DEBUG (( EFI_D_INFO, "UsbParseInterfaceDesc: interface %d(setting %d) has %d endpoints\n",
DEBUG (( DEBUG_INFO, "UsbParseInterfaceDesc: interface %d(setting %d) has %d endpoints\n",
Setting->Desc.InterfaceNumber, Setting->Desc.AlternateSetting, (UINT32)NumEp));
if (NumEp == 0) {
@@ -303,7 +303,7 @@ UsbParseInterfaceDesc (
Ep = UsbCreateDesc (DescBuf + Offset, Len - Offset, USB_DESC_TYPE_ENDPOINT, &Used);
if (Ep == NULL) {
DEBUG (( EFI_D_ERROR, "UsbParseInterfaceDesc: failed to create endpoint(index %d)\n", (UINT32)Index));
DEBUG (( DEBUG_ERROR, "UsbParseInterfaceDesc: failed to create endpoint(index %d)\n", (UINT32)Index));
goto ON_ERROR;
}
@@ -362,7 +362,7 @@ UsbParseConfigDesc (
goto ON_ERROR;
}
DEBUG (( EFI_D_INFO, "UsbParseConfigDesc: config %d has %d interfaces\n",
DEBUG (( DEBUG_INFO, "UsbParseConfigDesc: config %d has %d interfaces\n",
Config->Desc.ConfigurationValue, (UINT32)NumIf));
for (Index = 0; Index < NumIf; Index++) {
@@ -394,7 +394,7 @@ UsbParseConfigDesc (
Setting = UsbParseInterfaceDesc (DescBuf, Len, &Consumed);
if (Setting == NULL) {
DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: warning: failed to get interface setting, stop parsing now.\n"));
DEBUG (( DEBUG_ERROR, "UsbParseConfigDesc: warning: failed to get interface setting, stop parsing now.\n"));
break;
} else if (Setting->Desc.InterfaceNumber >= NumIf) {
@@ -765,13 +765,13 @@ UsbGetOneConfig (
Status = UsbCtrlGetDesc (UsbDev, USB_DESC_TYPE_CONFIG, Index, 0, &Desc, 8);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbGetOneConfig: failed to get descript length(%d) %r\n",
DEBUG (( DEBUG_ERROR, "UsbGetOneConfig: failed to get descript length(%d) %r\n",
Desc.TotalLength, Status));
return NULL;
}
DEBUG (( EFI_D_INFO, "UsbGetOneConfig: total length is %d\n", Desc.TotalLength));
DEBUG (( DEBUG_INFO, "UsbGetOneConfig: total length is %d\n", Desc.TotalLength));
//
// Reject if TotalLength even cannot cover itself.
@@ -789,7 +789,7 @@ UsbGetOneConfig (
Status = UsbCtrlGetDesc (UsbDev, USB_DESC_TYPE_CONFIG, Index, 0, Buf, Desc.TotalLength);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbGetOneConfig: failed to get full descript %r\n", Status));
DEBUG (( DEBUG_ERROR, "UsbGetOneConfig: failed to get full descript %r\n", Status));
FreePool (Buf);
return NULL;
@@ -829,7 +829,7 @@ UsbBuildDescTable (
Status = UsbGetDevDesc (UsbDev);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbBuildDescTable: failed to get device descriptor - %r\n", Status));
DEBUG (( DEBUG_ERROR, "UsbBuildDescTable: failed to get device descriptor - %r\n", Status));
return Status;
}
@@ -844,7 +844,7 @@ UsbBuildDescTable (
return EFI_OUT_OF_RESOURCES;
}
DEBUG (( EFI_D_INFO, "UsbBuildDescTable: device has %d configures\n", NumConfig));
DEBUG (( DEBUG_INFO, "UsbBuildDescTable: device has %d configures\n", NumConfig));
//
// Read each configurations, then parse them
@@ -853,7 +853,7 @@ UsbBuildDescTable (
Config = UsbGetOneConfig (UsbDev, Index);
if (Config == NULL) {
DEBUG (( EFI_D_ERROR, "UsbBuildDescTable: failed to get configure (index %d)\n", Index));
DEBUG (( DEBUG_ERROR, "UsbBuildDescTable: failed to get configure (index %d)\n", Index));
//
// If we can get the default descriptor, it is likely that the
@@ -871,7 +871,7 @@ UsbBuildDescTable (
FreePool (Config);
if (ConfigDesc == NULL) {
DEBUG (( EFI_D_ERROR, "UsbBuildDescTable: failed to parse configure (index %d)\n", Index));
DEBUG (( DEBUG_ERROR, "UsbBuildDescTable: failed to parse configure (index %d)\n", Index));
//
// If we can get the default descriptor, it is likely that the
@@ -894,7 +894,7 @@ UsbBuildDescTable (
Status = UsbBuildLangTable (UsbDev);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_INFO, "UsbBuildDescTable: get language ID table %r\n", Status));
DEBUG (( DEBUG_INFO, "UsbBuildDescTable: get language ID table %r\n", Status));
}
return EFI_SUCCESS;

View File

@@ -132,7 +132,7 @@ UsbCreateInterface (
UsbIf->DevicePath = AppendDevicePathNode (HubIf->DevicePath, &UsbNode.Header);
if (UsbIf->DevicePath == NULL) {
DEBUG ((EFI_D_ERROR, "UsbCreateInterface: failed to create device path\n"));
DEBUG ((DEBUG_ERROR, "UsbCreateInterface: failed to create device path\n"));
Status = EFI_OUT_OF_RESOURCES;
goto ON_ERROR;
@@ -148,7 +148,7 @@ UsbCreateInterface (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbCreateInterface: failed to install UsbIo - %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbCreateInterface: failed to install UsbIo - %r\n", Status));
goto ON_ERROR;
}
@@ -167,7 +167,7 @@ UsbCreateInterface (
NULL
);
DEBUG ((EFI_D_ERROR, "UsbCreateInterface: failed to open host for child - %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbCreateInterface: failed to open host for child - %r\n", Status));
goto ON_ERROR;
}
@@ -262,7 +262,7 @@ UsbConnectDriver (
// connect drivers with this interface
//
if (UsbIsHubInterface (UsbIf)) {
DEBUG ((EFI_D_INFO, "UsbConnectDriver: found a hub device\n"));
DEBUG ((DEBUG_INFO, "UsbConnectDriver: found a hub device\n"));
Status = mUsbHubApi.Init (UsbIf);
} else {
@@ -279,14 +279,14 @@ UsbConnectDriver (
//
if (UsbBusIsWantedUsbIO (UsbIf->Device->Bus, UsbIf)) {
OldTpl = UsbGetCurrentTpl ();
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d, %p\n", (UINT32)OldTpl, UsbIf->Handle));
DEBUG ((DEBUG_INFO, "UsbConnectDriver: TPL before connect is %d, %p\n", (UINT32)OldTpl, UsbIf->Handle));
gBS->RestoreTPL (TPL_CALLBACK);
Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
DEBUG ((DEBUG_INFO, "UsbConnectDriver: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
gBS->RaiseTPL (OldTpl);
@@ -340,7 +340,7 @@ UsbSelectSetting (
IfDesc->ActiveIndex = Index;
ASSERT (Setting != NULL);
DEBUG ((EFI_D_INFO, "UsbSelectSetting: setting %d selected for interface %d\n",
DEBUG ((DEBUG_INFO, "UsbSelectSetting: setting %d selected for interface %d\n",
Alternate, Setting->Desc.InterfaceNumber));
//
@@ -399,7 +399,7 @@ UsbSelectConfig (
Device->ActiveConfig = ConfigDesc;
DEBUG ((EFI_D_INFO, "UsbSelectConfig: config %d selected for device %d\n",
DEBUG ((DEBUG_INFO, "UsbSelectConfig: config %d selected for device %d\n",
ConfigValue, Device->Address));
//
@@ -479,7 +479,7 @@ UsbDisconnectDriver (
// or disconnect at CALLBACK.
//
OldTpl = UsbGetCurrentTpl ();
DEBUG ((EFI_D_INFO, "UsbDisconnectDriver: old TPL is %d, %p\n", (UINT32)OldTpl, UsbIf->Handle));
DEBUG ((DEBUG_INFO, "UsbDisconnectDriver: old TPL is %d, %p\n", (UINT32)OldTpl, UsbIf->Handle));
gBS->RestoreTPL (TPL_CALLBACK);
@@ -488,7 +488,7 @@ UsbDisconnectDriver (
UsbIf->IsManaged = FALSE;
}
DEBUG (( EFI_D_INFO, "UsbDisconnectDriver: TPL after disconnect is %d, %d\n", (UINT32)UsbGetCurrentTpl(), Status));
DEBUG (( DEBUG_INFO, "UsbDisconnectDriver: TPL after disconnect is %d, %d\n", (UINT32)UsbGetCurrentTpl(), Status));
ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
gBS->RaiseTPL (OldTpl);
@@ -586,7 +586,7 @@ UsbRemoveDevice (
} else {
Bus->Devices[Index]->DisconnectFail = TRUE;
ReturnStatus = Status;
DEBUG ((EFI_D_INFO, "UsbRemoveDevice: failed to remove child %p at parent %p\n", Child, Device));
DEBUG ((DEBUG_INFO, "UsbRemoveDevice: failed to remove child %p at parent %p\n", Child, Device));
}
}
@@ -597,7 +597,7 @@ UsbRemoveDevice (
Status = UsbRemoveConfig (Device);
if (!EFI_ERROR (Status)) {
DEBUG (( EFI_D_INFO, "UsbRemoveDevice: device %d removed\n", Device->Address));
DEBUG (( DEBUG_INFO, "UsbRemoveDevice: device %d removed\n", Device->Address));
ASSERT (Device->Address < Bus->MaxDevices);
Bus->Devices[Device->Address] = NULL;
@@ -691,13 +691,13 @@ UsbEnumerateNewDev (
if (ResetIsNeeded) {
Status = HubApi->ResetPort (HubIf, Port);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to reset port %d - %r\n", Port, Status));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to reset port %d - %r\n", Port, Status));
return Status;
}
DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: hub port %d is reset\n", Port));
DEBUG (( DEBUG_INFO, "UsbEnumerateNewDev: hub port %d is reset\n", Port));
} else {
DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: hub port %d reset is skipped\n", Port));
DEBUG (( DEBUG_INFO, "UsbEnumerateNewDev: hub port %d reset is skipped\n", Port));
}
Child = UsbCreateDevice (HubIf, Port);
@@ -713,12 +713,12 @@ UsbEnumerateNewDev (
Status = HubApi->GetPortStatus (HubIf, Port, &PortState);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to get speed of port %d\n", Port));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to get speed of port %d\n", Port));
goto ON_ERROR;
}
if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_CONNECTION)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: No device present at port %d\n", Port));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: No device present at port %d\n", Port));
Status = EFI_NOT_FOUND;
goto ON_ERROR;
} else if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_SUPER_SPEED)){
@@ -735,7 +735,7 @@ UsbEnumerateNewDev (
Child->MaxPacket0 = 8;
}
DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: device is of %d speed\n", Child->Speed));
DEBUG (( DEBUG_INFO, "UsbEnumerateNewDev: device is of %d speed\n", Child->Speed));
if (((Child->Speed == EFI_USB_SPEED_LOW) || (Child->Speed == EFI_USB_SPEED_FULL)) &&
(Parent->Speed == EFI_USB_SPEED_HIGH)) {
@@ -751,7 +751,7 @@ UsbEnumerateNewDev (
} else {
Child->Translator = Parent->Translator;
}
DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: device uses translator (%d, %d)\n",
DEBUG (( DEBUG_INFO, "UsbEnumerateNewDev: device uses translator (%d, %d)\n",
Child->Translator.TranslatorHubAddress,
Child->Translator.TranslatorPortNumber));
@@ -775,7 +775,7 @@ UsbEnumerateNewDev (
}
if (Address >= Bus->MaxDevices) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: address pool is full for port %d\n", Port));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: address pool is full for port %d\n", Port));
Status = EFI_ACCESS_DENIED;
goto ON_ERROR;
@@ -786,13 +786,13 @@ UsbEnumerateNewDev (
Bus->Devices[Address] = Child;
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to set device address - %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to set device address - %r\n", Status));
goto ON_ERROR;
}
gBS->Stall (USB_SET_DEVICE_ADDRESS_STALL);
DEBUG ((EFI_D_INFO, "UsbEnumerateNewDev: device is now ADDRESSED at %d\n", Address));
DEBUG ((DEBUG_INFO, "UsbEnumerateNewDev: device is now ADDRESSED at %d\n", Address));
//
// Host sends a Get_Descriptor request to learn the max packet
@@ -801,11 +801,11 @@ UsbEnumerateNewDev (
Status = UsbGetMaxPacketSize0 (Child);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to get max packet for EP 0 - %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to get max packet for EP 0 - %r\n", Status));
goto ON_ERROR;
}
DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: max packet size for EP 0 is %d\n", Child->MaxPacket0));
DEBUG (( DEBUG_INFO, "UsbEnumerateNewDev: max packet size for EP 0 is %d\n", Child->MaxPacket0));
//
// Host learns about the device's abilities by requesting device's
@@ -814,7 +814,7 @@ UsbEnumerateNewDev (
Status = UsbBuildDescTable (Child);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to build descriptor table - %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to build descriptor table - %r\n", Status));
goto ON_ERROR;
}
@@ -826,11 +826,11 @@ UsbEnumerateNewDev (
Status = UsbSetConfig (Child, Config);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to set configure %d - %r\n", Config, Status));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to set configure %d - %r\n", Config, Status));
goto ON_ERROR;
}
DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: device %d is now in CONFIGED state\n", Address));
DEBUG (( DEBUG_INFO, "UsbEnumerateNewDev: device %d is now in CONFIGED state\n", Address));
//
// Host assigns and loads a device driver.
@@ -838,7 +838,7 @@ UsbEnumerateNewDev (
Status = UsbSelectConfig (Child, Config);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to create interfaces - %r\n", Status));
DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to create interfaces - %r\n", Status));
goto ON_ERROR;
}
@@ -902,7 +902,7 @@ UsbEnumeratePort (
Status = HubApi->GetPortStatus (HubIf, Port, &PortState);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbEnumeratePort: failed to get state of port %d\n", Port));
DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: failed to get state of port %d\n", Port));
return Status;
}
@@ -914,7 +914,7 @@ UsbEnumeratePort (
return EFI_SUCCESS;
}
DEBUG (( EFI_D_INFO, "UsbEnumeratePort: port %d state - %02x, change - %02x on %p\n",
DEBUG (( DEBUG_INFO, "UsbEnumeratePort: port %d state - %02x, change - %02x on %p\n",
Port, PortState.PortStatus, PortState.PortChangeStatus, HubIf));
//
@@ -932,7 +932,7 @@ UsbEnumeratePort (
// which probably is caused by short circuit. It has to wait system hardware
// to perform recovery.
//
DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: Critical Over Current\n", Port));
DEBUG (( DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current\n", Port));
return EFI_DEVICE_ERROR;
}
@@ -942,7 +942,7 @@ UsbEnumeratePort (
// over current. As a result, all ports are nearly power-off, so
// it's necessary to detach and enumerate all ports again.
//
DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current\n", Port));
DEBUG (( DEBUG_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current\n", Port));
}
if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_ENABLE)) {
@@ -952,7 +952,7 @@ UsbEnumeratePort (
// on 2.0 roothub does. When over-current has influence on 1.1 device, the port
// would be disabled, so it's also necessary to detach and enumerate again.
//
DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current\n", Port));
DEBUG (( DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current\n", Port));
}
if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNECTION)) {
@@ -960,7 +960,7 @@ UsbEnumeratePort (
// Case4:
// Device connected or disconnected normally.
//
DEBUG ((EFI_D_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally\n", Port));
DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally\n", Port));
}
//
@@ -969,7 +969,7 @@ UsbEnumeratePort (
Child = UsbFindChild (HubIf, Port);
if (Child != NULL) {
DEBUG (( EFI_D_INFO, "UsbEnumeratePort: device at port %d removed from root hub %p\n", Port, HubIf));
DEBUG (( DEBUG_INFO, "UsbEnumeratePort: device at port %d removed from root hub %p\n", Port, HubIf));
UsbRemoveDevice (Child);
}
@@ -977,7 +977,7 @@ UsbEnumeratePort (
//
// Now, new device connected, enumerate and configure the device
//
DEBUG (( EFI_D_INFO, "UsbEnumeratePort: new device connected at port %d\n", Port));
DEBUG (( DEBUG_INFO, "UsbEnumeratePort: new device connected at port %d\n", Port));
if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) {
Status = UsbEnumerateNewDev (HubIf, Port, FALSE);
} else {
@@ -985,7 +985,7 @@ UsbEnumeratePort (
}
} else {
DEBUG (( EFI_D_INFO, "UsbEnumeratePort: device disconnected event on port %d\n", Port));
DEBUG (( DEBUG_INFO, "UsbEnumeratePort: device disconnected event on port %d\n", Port));
}
HubApi->ClearPortChange (HubIf, Port);
@@ -1020,7 +1020,7 @@ UsbHubEnumeration (
for (Index = 0; Index < HubIf->NumOfPort; Index++) {
Child = UsbFindChild (HubIf, Index);
if ((Child != NULL) && (Child->DisconnectFail == TRUE)) {
DEBUG (( EFI_D_INFO, "UsbEnumeratePort: The device disconnect fails at port %d from hub %p, try again\n", Index, HubIf));
DEBUG (( DEBUG_INFO, "UsbEnumeratePort: The device disconnect fails at port %d from hub %p, try again\n", Index, HubIf));
UsbRemoveDevice (Child);
}
}
@@ -1074,7 +1074,7 @@ UsbRootHubEnumeration (
for (Index = 0; Index < RootHub->NumOfPort; Index++) {
Child = UsbFindChild (RootHub, Index);
if ((Child != NULL) && (Child->DisconnectFail == TRUE)) {
DEBUG (( EFI_D_INFO, "UsbEnumeratePort: The device disconnect fails at port %d from root hub %p, try again\n", Index, RootHub));
DEBUG (( DEBUG_INFO, "UsbEnumeratePort: The device disconnect fails at port %d from root hub %p, try again\n", Index, RootHub));
UsbRemoveDevice (Child);
}

View File

@@ -516,7 +516,7 @@ UsbOnHubInterrupt (
);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbOnHubInterrupt: failed to remove async transfer - %r\n", Status));
DEBUG (( DEBUG_ERROR, "UsbOnHubInterrupt: failed to remove async transfer - %r\n", Status));
return Status;
}
@@ -531,7 +531,7 @@ UsbOnHubInterrupt (
);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbOnHubInterrupt: failed to submit new async transfer - %r\n", Status));
DEBUG (( DEBUG_ERROR, "UsbOnHubInterrupt: failed to submit new async transfer - %r\n", Status));
}
return Status;
@@ -608,7 +608,7 @@ UsbHubInit (
}
if (Index == NumEndpoints) {
DEBUG (( EFI_D_ERROR, "UsbHubInit: no interrupt endpoint found for hub %d\n", HubDev->Address));
DEBUG (( DEBUG_ERROR, "UsbHubInit: no interrupt endpoint found for hub %d\n", HubDev->Address));
return EFI_DEVICE_ERROR;
}
@@ -620,13 +620,13 @@ UsbHubInit (
Status = UsbHubReadDesc (HubDev, HubDesc);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbHubInit: failed to read HUB descriptor %r\n", Status));
DEBUG (( DEBUG_ERROR, "UsbHubInit: failed to read HUB descriptor %r\n", Status));
return Status;
}
HubIf->NumOfPort = HubDesc->NumPorts;
DEBUG (( EFI_D_INFO, "UsbHubInit: hub %d has %d ports\n", HubDev->Address,HubIf->NumOfPort));
DEBUG (( DEBUG_INFO, "UsbHubInit: hub %d has %d ports\n", HubDev->Address,HubIf->NumOfPort));
//
// OK, set IsHub to TRUE. Now usb bus can handle this device
@@ -640,7 +640,7 @@ UsbHubInit (
if (HubIf->Device->Speed == EFI_USB_SPEED_SUPER) {
Depth = (UINT16)(HubIf->Device->Tier - 1);
DEBUG ((EFI_D_INFO, "UsbHubInit: Set Hub Depth as 0x%x\n", Depth));
DEBUG ((DEBUG_INFO, "UsbHubInit: Set Hub Depth as 0x%x\n", Depth));
UsbHubCtrlSetHubDepth (HubIf->Device, Depth);
for (Index = 0; Index < HubDesc->NumPorts; Index++) {
@@ -676,7 +676,7 @@ UsbHubInit (
);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbHubInit: failed to create signal for hub %d - %r\n",
DEBUG (( DEBUG_ERROR, "UsbHubInit: failed to create signal for hub %d - %r\n",
HubDev->Address, Status));
return Status;
@@ -701,7 +701,7 @@ UsbHubInit (
);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbHubInit: failed to queue interrupt transfer for hub %d - %r\n",
DEBUG (( DEBUG_ERROR, "UsbHubInit: failed to queue interrupt transfer for hub %d - %r\n",
HubDev->Address, Status));
gBS->CloseEvent (HubIf->HubNotify);
@@ -710,7 +710,7 @@ UsbHubInit (
return Status;
}
DEBUG (( EFI_D_INFO, "UsbHubInit: hub %d initialized\n", HubDev->Address));
DEBUG (( DEBUG_INFO, "UsbHubInit: hub %d initialized\n", HubDev->Address));
return Status;
}
@@ -935,7 +935,7 @@ UsbHubRelease (
HubIf->HubEp = NULL;
HubIf->HubNotify = NULL;
DEBUG (( EFI_D_INFO, "UsbHubRelease: hub device %d released\n", HubIf->Device->Address));
DEBUG (( DEBUG_INFO, "UsbHubRelease: hub device %d released\n", HubIf->Device->Address));
return EFI_SUCCESS;
}
@@ -966,7 +966,7 @@ UsbRootHubInit (
return Status;
}
DEBUG (( EFI_D_INFO, "UsbRootHubInit: root hub %p - max speed %d, %d ports\n",
DEBUG (( DEBUG_INFO, "UsbRootHubInit: root hub %p - max speed %d, %d ports\n",
HubIf, MaxSpeed, NumOfPort));
HubIf->IsHub = TRUE;
@@ -1168,7 +1168,7 @@ UsbRootHubResetPort (
Status = UsbHcSetRootHubPortFeature (Bus, Port, EfiUsbPortReset);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbRootHubResetPort: failed to start reset on port %d\n", Port));
DEBUG (( DEBUG_ERROR, "UsbRootHubResetPort: failed to start reset on port %d\n", Port));
return Status;
}
@@ -1181,7 +1181,7 @@ UsbRootHubResetPort (
Status = UsbHcClearRootHubPortFeature (Bus, Port, EfiUsbPortReset);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbRootHubResetPort: failed to clear reset on port %d\n", Port));
DEBUG (( DEBUG_ERROR, "UsbRootHubResetPort: failed to clear reset on port %d\n", Port));
return Status;
}
@@ -1208,7 +1208,7 @@ UsbRootHubResetPort (
}
if (Index == USB_WAIT_PORT_STS_CHANGE_LOOP) {
DEBUG ((EFI_D_ERROR, "UsbRootHubResetPort: reset not finished in time on port %d\n", Port));
DEBUG ((DEBUG_ERROR, "UsbRootHubResetPort: reset not finished in time on port %d\n", Port));
return EFI_TIMEOUT;
}
@@ -1220,7 +1220,7 @@ UsbRootHubResetPort (
// automatically enable the port, we need to enable it manually.
//
if (RootIf->MaxSpeed == EFI_USB_SPEED_HIGH) {
DEBUG (( EFI_D_ERROR, "UsbRootHubResetPort: release low/full speed device (%d) to UHCI\n", Port));
DEBUG (( DEBUG_ERROR, "UsbRootHubResetPort: release low/full speed device (%d) to UHCI\n", Port));
UsbRootHubSetPortFeature (RootIf, Port, EfiUsbPortOwner);
return EFI_NOT_FOUND;
@@ -1230,7 +1230,7 @@ UsbRootHubResetPort (
Status = UsbRootHubSetPortFeature (RootIf, Port, EfiUsbPortEnable);
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbRootHubResetPort: failed to enable port %d for UHCI\n", Port));
DEBUG (( DEBUG_ERROR, "UsbRootHubResetPort: failed to enable port %d for UHCI\n", Port));
return Status;
}
@@ -1256,7 +1256,7 @@ UsbRootHubRelease (
IN USB_INTERFACE *HubIf
)
{
DEBUG (( EFI_D_INFO, "UsbRootHubRelease: root hub released for hub %p\n", HubIf));
DEBUG (( DEBUG_INFO, "UsbRootHubRelease: root hub released for hub %p\n", HubIf));
gBS->SetTimer (HubIf->HubNotify, TimerCancel, USB_ROOTHUB_POLL_INTERVAL);
gBS->CloseEvent (HubIf->HubNotify);

View File

@@ -1212,10 +1212,10 @@ UsbBusRecursivelyConnectWantedUsbIo (
//
// Recursively connect the wanted Usb Io handle
//
DEBUG ((EFI_D_INFO, "UsbBusRecursivelyConnectWantedUsbIo: TPL before connect is %d\n", (UINT32)UsbGetCurrentTpl ()));
DEBUG ((DEBUG_INFO, "UsbBusRecursivelyConnectWantedUsbIo: TPL before connect is %d\n", (UINT32)UsbGetCurrentTpl ()));
Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
DEBUG ((EFI_D_INFO, "UsbBusRecursivelyConnectWantedUsbIo: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
DEBUG ((DEBUG_INFO, "UsbBusRecursivelyConnectWantedUsbIo: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
}
}
}
@@ -1224,4 +1224,3 @@ UsbBusRecursivelyConnectWantedUsbIo (
return EFI_SUCCESS;
}