Fixed unexpected timeout in Usb MassStorage Driver.
Fixed unexpected timeout in Uhci/Ehci driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4038 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -194,7 +194,7 @@ UsbCbiSendCommand (
|
||||
Request.Length = CmdLen;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
Timeout = Timeout / USB_MASS_STALL_1_MS;
|
||||
Timeout = Timeout / USB_MASS_1_MILLISECOND;
|
||||
|
||||
for (Retry = 0; Retry < USB_CBI_MAX_RETRY; Retry++) {
|
||||
//
|
||||
@@ -281,7 +281,7 @@ UsbCbiDataTransfer (
|
||||
Remain = *TransLen;
|
||||
Retry = 0;
|
||||
Status = EFI_SUCCESS;
|
||||
Timeout = Timeout / USB_MASS_STALL_1_MS;
|
||||
Timeout = Timeout / USB_MASS_1_MILLISECOND;
|
||||
|
||||
//
|
||||
// Transfer the data, if the device returns NAK, retry it.
|
||||
@@ -376,7 +376,7 @@ UsbCbiGetStatus (
|
||||
|
||||
Endpoint = UsbCbi->InterruptEndpoint->EndpointAddress;
|
||||
Status = EFI_SUCCESS;
|
||||
Timeout = Timeout / USB_MASS_STALL_1_MS;
|
||||
Timeout = Timeout / USB_MASS_1_MILLISECOND;
|
||||
|
||||
//
|
||||
// Attemp to the read the result from interrupt endpoint
|
||||
@@ -555,7 +555,7 @@ UsbCbiResetDevice (
|
||||
|
||||
ResetCmd[0] = 0x1D;
|
||||
ResetCmd[1] = 0x04;
|
||||
Timeout = USB_CBI_RESET_TIMEOUT / USB_MASS_STALL_1_MS;
|
||||
Timeout = USB_CBI_RESET_DEVICE_TIMEOUT / USB_MASS_1_MILLISECOND;
|
||||
|
||||
//
|
||||
// Send the command to the device. Don't use UsbCbiExecCommand here.
|
||||
@@ -570,7 +570,7 @@ UsbCbiResetDevice (
|
||||
// 50ms to wait it complete
|
||||
//
|
||||
UsbCbiGetStatus (UsbCbi, Timeout, &Result);
|
||||
gBS->Stall (50 * 1000);
|
||||
gBS->Stall (USB_CBI_RESET_DEVICE_STALL);
|
||||
|
||||
//
|
||||
// Clear the Bulk-In and Bulk-Out stall condition and
|
||||
|
Reference in New Issue
Block a user