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
This commit is contained in:
@@ -813,6 +813,7 @@ UsbIoPortReset (
|
||||
USB_DEVICE *Dev;
|
||||
EFI_TPL OldTpl;
|
||||
EFI_STATUS Status;
|
||||
UINT8 DevAddress;
|
||||
|
||||
OldTpl = gBS->RaiseTPL (USB_BUS_TPL);
|
||||
|
||||
@@ -834,12 +835,17 @@ UsbIoPortReset (
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
HubIf->HubApi->ClearPortChange (HubIf, Dev->ParentPort);
|
||||
|
||||
//
|
||||
// Reset the device to its current address. The device now has an address
|
||||
// of ZERO after port reset, so need to set Dev->Address to the device again for
|
||||
// host to communicate with it.
|
||||
//
|
||||
Status = UsbSetAddress (Dev, Dev->Address);
|
||||
DevAddress = Dev->Address;
|
||||
Dev->Address = 0;
|
||||
Status = UsbSetAddress (Dev, DevAddress);
|
||||
Dev->Address = DevAddress;
|
||||
|
||||
gBS->Stall (USB_SET_DEVICE_ADDRESS_STALL);
|
||||
|
||||
|
Reference in New Issue
Block a user