summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-29 09:32:55 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-29 09:32:55 +0000
commit71619ac2b577412cf43d543928489cdf34bbd844 (patch)
tree488cdda24a824f24cd8a8e7ba235ad90cea4d495 /MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
parent20bcb757d2d85f59c749e004e580bc2e52a96459 (diff)
MdeMdeModulePkg/Usb: two tunings for better device identification behind hub
1.enlarge the recovery time from 10ms to 20ms after port reset to make set address request success for better device compatibility. 2.another enhancement is to use RESET_C bit rather than RESET bit to judge if hub reset port operation is done. Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14227 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
index 2d24bb4b8..9e5299c0e 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
@@ -975,13 +975,13 @@ UsbHubResetPort (
}
//
- // Drive the reset signal for at least 10ms. Check USB 2.0 Spec
+ // Drive the reset signal for worst 20ms. Check USB 2.0 Spec
// section 7.1.7.5 for timing requirements.
//
gBS->Stall (USB_SET_PORT_RESET_STALL);
//
- // USB hub will clear RESET bit if reset is actually finished.
+ // Check USB_PORT_STAT_C_RESET bit to see if the resetting state is done.
//
ZeroMem (&PortState, sizeof (EFI_USB_PORT_STATUS));
@@ -989,8 +989,8 @@ UsbHubResetPort (
Status = UsbHubGetPortStatus (HubIf, Port, &PortState);
if (!EFI_ERROR (Status) &&
- !USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_RESET)) {
-
+ USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) {
+ gBS->Stall (USB_SET_PORT_RECOVERY_STALL);
return EFI_SUCCESS;
}