Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
r48674 r58459 3 3 which is used to enable recovery function from USB Drivers. 4 4 5 Copyright (c) 2006 - 201 0, Intel Corporation. All rights reserved. <BR>5 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR> 6 6 7 7 This program and the accompanying materials … … 154 154 @param DataLength The size (in bytes) of the data buffer. 155 155 @param TimeOut Indicates the maximum timeout, in millisecond. 156 If Timeout is 0, then the caller must wait for the function 157 to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. 156 158 @param TransferResult Return the result of this control transfer. 157 159 … … 392 394 @param TimeOut Indicates the maximum time, in millisecond, which the 393 395 transfer is allowed to complete. 396 If Timeout is 0, then the caller must wait for the function 397 to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. 394 398 @param TransferResult A pointer to the detailed result information of the 395 399 bulk transfer. … … 1044 1048 return EFI_OUT_OF_RESOURCES; 1045 1049 } 1046 1050 ASSERT (UhcDev->ConfigQH != NULL); 1051 1047 1052 Status = CreateQH(UhcDev, &UhcDev->BulkQH); 1048 1053 if (Status != EFI_SUCCESS) { 1049 1054 return EFI_OUT_OF_RESOURCES; 1050 1055 } 1056 ASSERT (UhcDev->BulkQH != NULL); 1051 1057 1052 1058 // … … 2509 2515 UINTN ErrTDPos; 2510 2516 UINTN Delay; 2517 BOOLEAN InfiniteLoop; 2511 2518 2512 2519 ErrTDPos = 0; 2513 2520 *TransferResult = EFI_USB_NOERROR; 2514 2521 *ActualLen = 0; 2515 2516 Delay = (TimeOut * STALL_1_MILLI_SECOND / 200) + 1; 2522 InfiniteLoop = FALSE; 2523 2524 Delay = TimeOut * STALL_1_MILLI_SECOND; 2525 // 2526 // If Timeout is 0, then the caller must wait for the function to be completed 2527 // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. 2528 // 2529 if (TimeOut == 0) { 2530 InfiniteLoop = TRUE; 2531 } 2517 2532 2518 2533 do { … … 2526 2541 break; 2527 2542 } 2528 MicroSecondDelay ( 200);2543 MicroSecondDelay (STALL_1_MICRO_SECOND); 2529 2544 Delay--; 2530 2545 2531 } while (Delay != 0); 2532 2546 } while (InfiniteLoop || (Delay != 0)); 2533 2547 2534 2548 if (*TransferResult != EFI_USB_NOERROR) { … … 2567 2581 UINTN ScrollNum; 2568 2582 UINTN Delay; 2583 BOOLEAN InfiniteLoop; 2569 2584 2570 2585 ErrTDPos = 0; 2571 2586 *TransferResult = EFI_USB_NOERROR; 2572 2587 *ActualLen = 0; 2573 2574 Delay = (TimeOut * STALL_1_MILLI_SECOND / 200) + 1; 2588 InfiniteLoop = FALSE; 2589 2590 Delay = TimeOut * STALL_1_MILLI_SECOND; 2591 // 2592 // If Timeout is 0, then the caller must wait for the function to be completed 2593 // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. 2594 // 2595 if (TimeOut == 0) { 2596 InfiniteLoop = TRUE; 2597 } 2575 2598 2576 2599 do { … … 2583 2606 break; 2584 2607 } 2585 MicroSecondDelay ( 200);2608 MicroSecondDelay (STALL_1_MICRO_SECOND); 2586 2609 Delay--; 2587 2610 2588 } while ( Delay != 0);2611 } while (InfiniteLoop || (Delay != 0)); 2589 2612 2590 2613 //
Note:
See TracChangeset
for help on using the changeset viewer.