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:
committed by
mergify[bot]
parent
917e98f3e5
commit
87000d7708
@@ -270,7 +270,7 @@ PeiUsbReadCapacity (
|
||||
LastBlock = ((UINT32) Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;
|
||||
|
||||
if (LastBlock == 0xFFFFFFFF) {
|
||||
DEBUG ((EFI_D_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
||||
DEBUG ((DEBUG_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
||||
}
|
||||
|
||||
PeiBotDevice->Media.LastBlock = LastBlock;
|
||||
@@ -341,7 +341,7 @@ PeiUsbReadFormattedCapacity (
|
||||
} else {
|
||||
LastBlock = ((UINT32) FormatData.LastLba3 << 24) | (FormatData.LastLba2 << 16) | (FormatData.LastLba1 << 8) | FormatData.LastLba0;
|
||||
if (LastBlock == 0xFFFFFFFF) {
|
||||
DEBUG ((EFI_D_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
||||
DEBUG ((DEBUG_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
||||
}
|
||||
|
||||
PeiBotDevice->Media.LastBlock = LastBlock;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -409,7 +409,7 @@ PeiDoHubConfig (
|
||||
PeiUsbDevice->DownStreamPortNo = HubDescriptor->NbrPorts;
|
||||
|
||||
if (PeiUsbDevice->DeviceSpeed == EFI_USB_SPEED_SUPER) {
|
||||
DEBUG ((EFI_D_INFO, "PeiDoHubConfig: Set Hub Depth as 0x%x\n", PeiUsbDevice->Tier));
|
||||
DEBUG ((DEBUG_INFO, "PeiDoHubConfig: Set Hub Depth as 0x%x\n", PeiUsbDevice->Tier));
|
||||
PeiUsbHubCtrlSetHubDepth (
|
||||
PeiServices,
|
||||
PeiUsbDevice,
|
||||
@@ -427,12 +427,12 @@ PeiDoHubConfig (
|
||||
EfiUsbPortPower
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG (( EFI_D_ERROR, "PeiDoHubConfig: PeiHubSetPortFeature EfiUsbPortPower failed %x\n", Index));
|
||||
DEBUG (( DEBUG_ERROR, "PeiDoHubConfig: PeiHubSetPortFeature EfiUsbPortPower failed %x\n", Index));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG (( EFI_D_INFO, "PeiDoHubConfig: HubDescriptor.PwrOn2PwrGood: 0x%x\n", HubDescriptor->PwrOn2PwrGood));
|
||||
DEBUG (( DEBUG_INFO, "PeiDoHubConfig: HubDescriptor.PwrOn2PwrGood: 0x%x\n", HubDescriptor->PwrOn2PwrGood));
|
||||
if (HubDescriptor->PwrOn2PwrGood > 0) {
|
||||
MicroSecondDelay (HubDescriptor->PwrOn2PwrGood * USB_SET_PORT_POWER_STALL);
|
||||
}
|
||||
@@ -536,7 +536,7 @@ PeiResetHubPort (
|
||||
}
|
||||
|
||||
if (Index == USB_WAIT_PORT_STS_CHANGE_LOOP) {
|
||||
DEBUG ((EFI_D_ERROR, "PeiResetHubPort: reset not finished in time on port %d\n", PortNum));
|
||||
DEBUG ((DEBUG_ERROR, "PeiResetHubPort: reset not finished in time on port %d\n", PortNum));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -119,7 +119,7 @@ PeiUsbControlTransfer (
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PeiUsbControlTransfer: %r\n", Status));
|
||||
DEBUG ((DEBUG_INFO, "PeiUsbControlTransfer: %r\n", Status));
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ PeiUsbBulkTransfer (
|
||||
PeiUsbDev->DataToggle = (UINT16) (PeiUsbDev->DataToggle ^ (1 << EndpointIndex));
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PeiUsbBulkTransfer: %r\n", Status));
|
||||
DEBUG ((DEBUG_INFO, "PeiUsbBulkTransfer: %r\n", Status));
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -221,7 +221,7 @@ PeiHubEnumeration (
|
||||
|
||||
UsbIoPpi = &PeiUsbDevice->UsbIoPpi;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PeiHubEnumeration: DownStreamPortNo: %x\n", PeiUsbDevice->DownStreamPortNo));
|
||||
DEBUG ((DEBUG_INFO, "PeiHubEnumeration: DownStreamPortNo: %x\n", PeiUsbDevice->DownStreamPortNo));
|
||||
|
||||
for (Index = 0; Index < PeiUsbDevice->DownStreamPortNo; Index++) {
|
||||
|
||||
@@ -236,7 +236,7 @@ PeiHubEnumeration (
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "USB Status --- Port: %x ConnectChange[%04x] Status[%04x]\n", Index, PortStatus.PortChangeStatus, PortStatus.PortStatus));
|
||||
DEBUG ((DEBUG_INFO, "USB Status --- Port: %x ConnectChange[%04x] Status[%04x]\n", Index, PortStatus.PortChangeStatus, PortStatus.PortStatus));
|
||||
//
|
||||
// Only handle connection/enable/overcurrent/reset change.
|
||||
//
|
||||
@@ -305,7 +305,7 @@ PeiHubEnumeration (
|
||||
}
|
||||
|
||||
NewPeiUsbDevice->DeviceSpeed = (UINT8) PeiUsbGetDeviceSpeed (PortStatus.PortStatus);
|
||||
DEBUG ((EFI_D_INFO, "Device Speed =%d\n", PeiUsbDevice->DeviceSpeed));
|
||||
DEBUG ((DEBUG_INFO, "Device Speed =%d\n", PeiUsbDevice->DeviceSpeed));
|
||||
|
||||
if (USB_BIT_IS_SET (PortStatus.PortStatus, USB_PORT_STAT_SUPER_SPEED)){
|
||||
NewPeiUsbDevice->MaxPacketSize0 = 512;
|
||||
@@ -339,7 +339,7 @@ PeiHubEnumeration (
|
||||
if (EFI_ERROR (Status)) {
|
||||
continue;
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "PeiHubEnumeration: PeiConfigureUsbDevice Success\n"));
|
||||
DEBUG ((DEBUG_INFO, "PeiHubEnumeration: PeiConfigureUsbDevice Success\n"));
|
||||
|
||||
Status = PeiServicesInstallPpi (&NewPeiUsbDevice->UsbIoPpiList);
|
||||
|
||||
@@ -445,7 +445,7 @@ PeiUsbEnumeration (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "PeiUsbEnumeration: NumOfRootPort: %x\n", NumOfRootPort));
|
||||
DEBUG ((DEBUG_INFO, "PeiUsbEnumeration: NumOfRootPort: %x\n", NumOfRootPort));
|
||||
|
||||
for (Index = 0; Index < NumOfRootPort; Index++) {
|
||||
//
|
||||
@@ -466,7 +466,7 @@ PeiUsbEnumeration (
|
||||
&PortStatus
|
||||
);
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "USB Status --- Port: %x ConnectChange[%04x] Status[%04x]\n", Index, PortStatus.PortChangeStatus, PortStatus.PortStatus));
|
||||
DEBUG ((DEBUG_INFO, "USB Status --- Port: %x ConnectChange[%04x] Status[%04x]\n", Index, PortStatus.PortChangeStatus, PortStatus.PortStatus));
|
||||
//
|
||||
// Only handle connection/enable/overcurrent/reset change.
|
||||
//
|
||||
@@ -555,7 +555,7 @@ PeiUsbEnumeration (
|
||||
}
|
||||
|
||||
PeiUsbDevice->DeviceSpeed = (UINT8) PeiUsbGetDeviceSpeed (PortStatus.PortStatus);
|
||||
DEBUG ((EFI_D_INFO, "Device Speed =%d\n", PeiUsbDevice->DeviceSpeed));
|
||||
DEBUG ((DEBUG_INFO, "Device Speed =%d\n", PeiUsbDevice->DeviceSpeed));
|
||||
|
||||
if (USB_BIT_IS_SET (PortStatus.PortStatus, USB_PORT_STAT_SUPER_SPEED)){
|
||||
PeiUsbDevice->MaxPacketSize0 = 512;
|
||||
@@ -580,7 +580,7 @@ PeiUsbEnumeration (
|
||||
if (EFI_ERROR (Status)) {
|
||||
continue;
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "PeiUsbEnumeration: PeiConfigureUsbDevice Success\n"));
|
||||
DEBUG ((DEBUG_INFO, "PeiUsbEnumeration: PeiConfigureUsbDevice Success\n"));
|
||||
|
||||
Status = PeiServicesInstallPpi (&PeiUsbDevice->UsbIoPpiList);
|
||||
|
||||
@@ -685,13 +685,13 @@ PeiConfigureUsbDevice (
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "PeiUsbGet Device Descriptor the %d time Success\n", Retry));
|
||||
DEBUG ((DEBUG_INFO, "PeiUsbGet Device Descriptor the %d time Success\n", Retry));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Retry == 3) {
|
||||
DEBUG ((EFI_D_ERROR, "PeiUsbGet Device Descriptor fail: %x %r\n", Retry, Status));
|
||||
DEBUG ((DEBUG_ERROR, "PeiUsbGet Device Descriptor fail: %x %r\n", Retry, Status));
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ PeiConfigureUsbDevice (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "PeiUsbSetDeviceAddress Failed: %r\n", Status));
|
||||
DEBUG ((DEBUG_ERROR, "PeiUsbSetDeviceAddress Failed: %r\n", Status));
|
||||
return Status;
|
||||
}
|
||||
MicroSecondDelay (USB_SET_DEVICE_ADDRESS_STALL);
|
||||
@@ -730,7 +730,7 @@ PeiConfigureUsbDevice (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "PeiUsbGetDescriptor First Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "PeiUsbGetDescriptor First Failed\n"));
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -801,7 +801,7 @@ PeiUsbGetAllConfiguration (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "PeiUsbGet Config Descriptor First Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "PeiUsbGet Config Descriptor First Failed\n"));
|
||||
return Status;
|
||||
}
|
||||
MicroSecondDelay (USB_GET_CONFIG_DESCRIPTOR_STALL);
|
||||
@@ -836,7 +836,7 @@ PeiUsbGetAllConfiguration (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "PeiUsbGet Config Descriptor all Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "PeiUsbGet Config Descriptor all Failed\n"));
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@@ -1046,7 +1046,7 @@ ResetRootPort (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ ResetRootPort (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ ResetRootPort (
|
||||
}
|
||||
|
||||
if (Index == USB_WAIT_PORT_STS_CHANGE_LOOP) {
|
||||
DEBUG ((EFI_D_ERROR, "ResetRootPort: reset not finished in time on port %d\n", PortNum));
|
||||
DEBUG ((DEBUG_ERROR, "ResetRootPort: reset not finished in time on port %d\n", PortNum));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1148,7 +1148,7 @@ ResetRootPort (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1169,7 +1169,7 @@ ResetRootPort (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
DEBUG ((DEBUG_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1200,7 +1200,7 @@ ResetRootPort (
|
||||
}
|
||||
|
||||
if (Index == USB_WAIT_PORT_STS_CHANGE_LOOP) {
|
||||
DEBUG ((EFI_D_ERROR, "ResetRootPort: reset not finished in time on port %d\n", PortNum));
|
||||
DEBUG ((DEBUG_ERROR, "ResetRootPort: reset not finished in time on port %d\n", PortNum));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1239,5 +1239,3 @@ ResetRootPort (
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user