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