]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c
1. UsbMassStorage: Increase the timeout of USBFloppyRead10 and USBFloppyWrite10 for...
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbMassStorage / Dxe / UsbMassStorageHelper.c
index c011349a78160774738fcc24efceb863e72fb765..6483601b2bdc5fb4fd6d84f6402b063fd2f6b05f 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -59,12 +59,6 @@ IsMediaWriteProtected (
   IN  UINTN                 SenseCounts\r
   );\r
 \r
-STATIC\r
-BOOLEAN\r
-IsLogicalUnitCommunicationOverRun (\r
-  IN  REQUEST_SENSE_DATA    *SenseData,\r
-  IN  UINTN                 SenseCounts\r
-  );\r
 \r
 EFI_STATUS\r
 USBFloppyPacketCommand (\r
@@ -354,7 +348,7 @@ USBFloppyRead10 (
 \r
       ByteCount               = SectorCount * BlockSize;\r
 \r
-      TimeOut                 = (UINT16) (SectorCount * USBFLPTIMEOUT);\r
+      TimeOut                 = (UINT16) (SectorCount * USBDATATIMEOUT);\r
 \r
 \r
       Status = USBFloppyPacketCommand (\r
@@ -786,7 +780,7 @@ USBFloppyWrite10 (
 \r
       ByteCount               = SectorCount * BlockSize;\r
 \r
-      TimeOut                 = (UINT16) (SectorCount * USBFLPTIMEOUT);\r
+      TimeOut                 = (UINT16) (SectorCount * USBDATATIMEOUT);\r
 \r
       Status = USBFloppyPacketCommand (\r
                  UsbFloppyDevice,\r
@@ -1546,29 +1540,3 @@ IsMediaWriteProtected (
   return IsWriteProtected;\r
 }\r
 \r
-BOOLEAN\r
-IsLogicalUnitCommunicationOverRun (\r
-  IN  REQUEST_SENSE_DATA    *SenseData,\r
-  IN  UINTN                 SenseCounts\r
-  )\r
-{\r
-  REQUEST_SENSE_DATA  *SensePtr;\r
-  UINTN               Index;\r
-  BOOLEAN             IsOverRun;\r
-\r
-  IsOverRun = FALSE;\r
-  SensePtr  = SenseData;\r
-\r
-  for (Index = 0; Index < SenseCounts; Index++) {\r
-\r
-    if ((SensePtr->sense_key == SK_NOT_READY) &&\r
-        (SensePtr->addnl_sense_code == ASC_LOGICAL_UNIT_STATUS) &&\r
-        (SensePtr->addnl_sense_code_qualifier == ASCQ_LOGICAL_UNIT_OVERRUN)) {\r
-      IsOverRun = TRUE;\r
-    }\r
-\r
-    SensePtr++;\r
-  }\r
-\r
-  return IsOverRun;\r
-}\r