diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-06-24 08:13:58 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-06-24 08:13:58 +0000 |
commit | 7e388f859fee079f0c5eb035354b1f1bb79ea2fc (patch) | |
tree | d7a5b08c6fd74acdeb4fce028753170085075fd7 | |
parent | 8b13229b469f05ec22d76098b052bd6e943fecee (diff) | |
download | edk2-platforms-7e388f859fee079f0c5eb035354b1f1bb79ea2fc.tar.xz |
[Description]:
The Usb1.1 flash disk will hang for Bootable Image Support Test -> Bloack IO protocol Test -> Reset_Func.
[Solution]:
Add a stall 20ms after set address when port reset for Usb hub.
[Impaction]:
UsbBusDxe.
[Reference Info]:
EDK tracker 1120 - USB flash disk hang or fail in the new SCT blockIo test.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5365 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c index 332871a685..5c4d4025eb 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c @@ -840,7 +840,8 @@ UsbIoPortReset ( Address = Dev->Address;
Dev->Address = 0;
Status = UsbSetAddress (Dev, Address);
-
+ Dev->Address = Address;
+
if (EFI_ERROR (Status)) {
DEBUG (( EFI_D_ERROR, "UsbIoPortReset: failed to set address for device %d - %r\n",
Address, Status));
@@ -848,8 +849,10 @@ UsbIoPortReset ( goto ON_EXIT;
}
- Dev->Address = Address;
+ gBS->Stall (USB_SET_DEVICE_ADDRESS_STALL);
+ DEBUG (( EFI_D_INFO, "UsbIoPortReset: device is now ADDRESSED at %d\n", Address));
+
//
// Reset the current active configure, after this device
// is in CONFIGURED state.
|