]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassBot.c
index c6c8f8d11b27780a7ebc33cf10368078aea8c4a4..9871d9359d1c8fdfbeb196da93dd3de3f9b3c7b4 100644 (file)
@@ -2,8 +2,8 @@
   Implementation of the USB mass storage Bulk-Only Transport protocol,\r
   according to USB Mass Storage Class Bulk-Only Transport, Revision 1.0.\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php\r
@@ -121,13 +121,13 @@ UsbBotInit (
   if (Context != NULL) {\r
     *Context = UsbBot;\r
   } else {\r
-    gBS->FreePool (UsbBot);\r
+    FreePool (UsbBot);\r
   }\r
 \r
   return EFI_SUCCESS;\r
 \r
 ON_ERROR:\r
-  gBS->FreePool (UsbBot);\r
+  FreePool (UsbBot);\r
   return Status;\r
 }\r
 \r
@@ -273,9 +273,16 @@ UsbBotDataTransfer (
                             );\r
   if (EFI_ERROR (Status)) {\r
     if (USB_IS_ERROR (Result, EFI_USB_ERR_STALL)) {\r
+      DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: (%r)\n", Status));      \r
+      DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: DataIn Stall\n"));\r
       UsbClearEndpointStall (UsbBot->UsbIo, Endpoint->EndpointAddress);\r
     } else if (USB_IS_ERROR (Result, EFI_USB_ERR_NAK)) {\r
       Status = EFI_NOT_READY;\r
+    } else {\r
+      DEBUG ((EFI_D_ERROR, "UsbBotDataTransfer: (%r)\n", Status));\r
+    }\r
+    if(Status == EFI_TIMEOUT){\r
+      UsbBotResetDevice(UsbBot, FALSE);\r
     }\r
   }\r
 \r
@@ -587,7 +594,7 @@ UsbBotCleanUp (
   IN  VOID                    *Context\r
   )\r
 {\r
-  gBS->FreePool (Context);\r
+  FreePool (Context);\r
   return EFI_SUCCESS;\r
 }\r
 \r