For USB mass storage, READ_FORMAT_CAPACITIES command returns wrong value for USB2...
[people/mcb30/edk2.git] / edk2 / EdkModulePkg / Bus / Usb / UsbMassStorage / Dxe / UsbMassStorageHelper.c
index 3d6a6d9..de61eeb 100644 (file)
@@ -999,26 +999,26 @@ UsbFloppyDetectMedia (
         Status = USBFloppyReadCapacity (UsbFloppyDevice);\r
         break;\r
 \r
-      case USBFLOPPY:\r
+      case USBFLOPPY2:\r
         UsbMassStorageModeSense (UsbFloppyDevice);\r
         Status = USBFloppyReadFormatCapacity (UsbFloppyDevice);\r
         if (EFI_ERROR (Status) || !UsbFloppyDevice->BlkMedia.MediaPresent) {\r
           //\r
           // retry the ReadCapacity command\r
           //\r
-          UsbFloppyDevice->DeviceType = USBFLOPPY2;\r
+          UsbFloppyDevice->DeviceType = USBFLOPPY;\r
           Status                      = EFI_DEVICE_ERROR;\r
         }\r
         break;\r
 \r
-      case USBFLOPPY2:\r
+      case USBFLOPPY:\r
         UsbMassStorageModeSense (UsbFloppyDevice);\r
         Status = USBFloppyReadCapacity (UsbFloppyDevice);\r
         if (EFI_ERROR (Status)) {\r
           //\r
           // retry the ReadFormatCapacity command\r
           //\r
-          UsbFloppyDevice->DeviceType = USBFLOPPY;\r
+          UsbFloppyDevice->DeviceType = USBFLOPPY2;\r
         }\r
         //\r
         // force the BlockSize to be 0x200.\r