edk2/MdeModulePkg
Paul Grimes 1a261da766 MdeModulePkg/UsbMassStorageDxe: Add retry mechanism to UsbMassReadBlocks
Add a retry mechanism to UsbMassReadBlocks() to improve robustness
when reading from USB mass storage devices. Some USB devices may
experience transient failures during read operations that can be
recovered by resetting the device and retrying.

The implementation:
- Saves original buffer parameters (Buffer, Lba, BufferSize)
- Attempts the read operation up to 4 times (initial + 3 retries)
- Resets the device via UsbMassReset() before each retry
- Restores buffer parameters before each retry attempt

This change is compliant with USB Mass Storage Class Bulk-Only
Transport Spec Rev 1.0:
- Section 5.3.4: Defines Reset Recovery procedure
- Section 3.1: States device is ready for next CBW after reset

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jacek Kolakowski <jacek.kolakowski@intel.com>
Signed-off-by: Paul Grimes <Paul.Grimes@amd.com>
2026-01-30 07:02:52 +00:00
..
Application MdeModulePkg/UiApp: Remove unused variable 2025-09-04 01:43:03 +00:00
Bus MdeModulePkg/UsbMassStorageDxe: Add retry mechanism to UsbMassReadBlocks 2026-01-30 07:02:52 +00:00
Core MdeModulePkg/Core: Make PPI services spec complaint 2026-01-30 02:18:50 +00:00
Include MdeModulePkg: fix various typos 2025-11-21 21:49:59 +00:00
Library MdeModulePkg/Library: Fix property typos 2026-01-26 08:44:12 +00:00
Logo MdeModulePkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
Test MdeModulePkg: Add unit tests for DxeReportStatusCodeLib 2026-01-14 04:00:20 +00:00
Universal MdeModulePkg/LoadFileOnFv2: Fix typo in Buffer parameter description 2026-01-23 10:46:37 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Add duplicate exception for gUiAppFileGuid 2025-03-06 14:18:10 +01:00
MdeModulePkg.dec MdeModulePkg: Define PCD for SATA ready for operation timeout. 2025-11-22 17:01:23 +00:00
MdeModulePkg.dsc MdeModulePkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
MdeModulePkg.uni MdeModulePkg: Deprecate EFI_UNICODE_COLLATION_PROTOCOL_GUID 2025-09-05 13:50:50 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00