diff options
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c index 795f545b77..8a69ca6ece 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c @@ -745,7 +745,7 @@ UsbHubInit ( UsbHubCtrlSetPortFeature (HubIf->Device, Index, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_POWER);
}
- gBS->Stall (HubDesc.PwrOn2PwrGood * 2 * USB_STALL_1_MS);
+ gBS->Stall (HubDesc.PwrOn2PwrGood * USB_SET_PORT_POWER_STALL);
UsbHubAckHubStatus (HubIf->Device);
DEBUG (( EFI_D_INFO, "UsbHubInit: hub %d initialized\n", HubDev->Address));
@@ -915,14 +915,14 @@ UsbHubResetPort ( // Drive the reset signal for at least 10ms. Check USB 2.0 Spec
// section 7.1.7.5 for timing requirements.
//
- gBS->Stall (20 * USB_STALL_1_MS);
+ gBS->Stall (USB_SET_PORT_RESET_STALL);
//
// USB hub will clear RESET bit if reset is actually finished.
//
ZeroMem (&PortState, sizeof (EFI_USB_PORT_STATUS));
- for (Index = 0; Index < 20; Index++) {
+ for (Index = 0; Index < USB_WAIT_PORT_STS_CHANGE_LOOP; Index++) {
Status = UsbHubGetPortStatus (HubIf, Port, &PortState);
if (!EFI_ERROR (Status) &&
@@ -931,7 +931,7 @@ UsbHubResetPort ( return EFI_SUCCESS;
}
- gBS->Stall (5 * USB_STALL_1_MS);
+ gBS->Stall (USB_WAIT_PORT_STS_CHANGE_STALL);
}
return EFI_TIMEOUT;
@@ -1228,7 +1228,7 @@ UsbRootHubResetPort ( // Drive the reset signal for at least 50ms. Check USB 2.0 Spec
// section 7.1.7.5 for timing requirements.
//
- gBS->Stall (50 * USB_STALL_1_MS);
+ gBS->Stall (USB_SET_ROOT_PORT_RESET_STALL);
Status = UsbHcClearRootHubPortFeature (Bus, Port, EfiUsbPortReset);
@@ -1237,7 +1237,7 @@ UsbRootHubResetPort ( return Status;
}
- gBS->Stall (USB_STALL_1_MS);
+ gBS->Stall (USB_CLR_ROOT_PORT_RESET_STALL);
//
// USB host controller won't clear the RESET bit until
@@ -1245,7 +1245,7 @@ UsbRootHubResetPort ( //
ZeroMem (&PortState, sizeof (EFI_USB_PORT_STATUS));
- for (Index = 0; Index < USB_HUB_LOOP; Index++) {
+ for (Index = 0; Index < USB_WAIT_PORT_STS_CHANGE_LOOP; Index++) {
Status = UsbHcGetRootHubPortStatus (Bus, Port, &PortState);
if (EFI_ERROR (Status)) {
@@ -1256,11 +1256,11 @@ UsbRootHubResetPort ( break;
}
- gBS->Stall (10 * USB_STALL_1_MS);
+ gBS->Stall (USB_WAIT_PORT_STS_CHANGE_STALL);
}
- if (Index == USB_HUB_LOOP) {
- DEBUG (( EFI_D_ERROR, "UsbRootHubResetPort: reset not finished in time on port %d\n", Port));
+ if (Index == USB_WAIT_PORT_STS_CHANGE_LOOP) {
+ DEBUG ((EFI_D_ERROR, "UsbRootHubResetPort: reset not finished in time on port %d\n", Port));
return EFI_TIMEOUT;
}
@@ -1286,7 +1286,7 @@ UsbRootHubResetPort ( return Status;
}
- gBS->Stall (20 * USB_STALL_1_MS);
+ gBS->Stall (USB_SET_ROOT_PORT_ENABLE_STALL);
}
}
|