mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
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> |
||
|---|---|---|
| .. | ||
| Ata | ||
| I2c/I2cDxe | ||
| Isa | ||
| Pci | ||
| Scsi | ||
| Sd | ||
| Spi | ||
| Ufs | ||
| Usb | ||