diff options
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.h | 4 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.h b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.h index 387c53a72d..fc19930cbd 100644 --- a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.h +++ b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.h @@ -33,8 +33,8 @@ Revision History #define PROTOCOL_CBI0 0
#define PROTOCOL_CBI1 1
-#define USBFLOPPY 1
-#define USBFLOPPY2 2 // for those that use ReadCapacity(0x25) command to retrieve media capacity
+#define USBFLOPPY 1 // for those that use ReadCapacity(0x25) command to retrieve media capacity
+#define USBFLOPPY2 2 // for those that use ReadFormatCapacity(0x23) command to retrieve media capacity
#define USBCDROM 3
#define USB_FLOPPY_DEV_SIGNATURE EFI_SIGNATURE_32 ('u', 'f', 'l', 'p')
diff --git a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c index 3d6a6d977b..de61eeb6d0 100644 --- a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c +++ b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c @@ -999,26 +999,26 @@ UsbFloppyDetectMedia ( Status = USBFloppyReadCapacity (UsbFloppyDevice);
break;
- case USBFLOPPY:
+ case USBFLOPPY2:
UsbMassStorageModeSense (UsbFloppyDevice);
Status = USBFloppyReadFormatCapacity (UsbFloppyDevice);
if (EFI_ERROR (Status) || !UsbFloppyDevice->BlkMedia.MediaPresent) {
//
// retry the ReadCapacity command
//
- UsbFloppyDevice->DeviceType = USBFLOPPY2;
+ UsbFloppyDevice->DeviceType = USBFLOPPY;
Status = EFI_DEVICE_ERROR;
}
break;
- case USBFLOPPY2:
+ case USBFLOPPY:
UsbMassStorageModeSense (UsbFloppyDevice);
Status = USBFloppyReadCapacity (UsbFloppyDevice);
if (EFI_ERROR (Status)) {
//
// retry the ReadFormatCapacity command
//
- UsbFloppyDevice->DeviceType = USBFLOPPY;
+ UsbFloppyDevice->DeviceType = USBFLOPPY2;
}
//
// force the BlockSize to be 0x200.
|