]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiUsbLib/UsbDxeLib.c
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / UefiUsbLib / UsbDxeLib.c
index 466ffeffa7a8bffd41a805397975a1f7f3d97939..b22a8294a4904b016ebd0ac6d072bb3a18cf8fbe 100644 (file)
@@ -3,12 +3,12 @@
   The library provides the USB Standard Device Requests defined \r
   in Usb specification 9.4 section.\r
   \r
-  Copyright (c) 2004 - 2007, Intel Corporation All rights\r
-  reserved. This program and the accompanying materials are\r
+  Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are\r
   licensed and made available under the terms and conditions of\r
   the BSD License which accompanies this distribution.  The full\r
   text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  http://opensource.org/licenses/bsd-license.php.\r
   \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -37,7 +37,7 @@
 \r
   @retval EFI_SUCCESS           The request executed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  The request could not be completed because the\r
-                                buffer specifed by DescriptorLength and Descriptor\r
+                                buffer specified by DescriptorLength and Descriptor\r
                                 is not large enough to hold the result of the request.\r
   @retval EFI_TIMEOUT           A timeout occurred executing the request.\r
   @retval EFI_DEVICE_ERROR      The request failed due to a device error. The transfer\r
@@ -73,7 +73,7 @@ UsbGetDescriptor (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   Descriptor,\r
                   DescriptorLength,\r
                   Status\r
@@ -133,7 +133,7 @@ UsbSetDescriptor (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataOut,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   Descriptor,\r
                   DescriptorLength,\r
                   Status\r
@@ -177,6 +177,8 @@ UsbGetInterface (
   ASSERT (AlternateSetting != NULL);\r
   ASSERT (Status != NULL);\r
 \r
+  *AlternateSetting = 0;\r
+\r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
   DevReq.RequestType  = USB_DEV_GET_INTERFACE_REQ_TYPE;\r
@@ -188,9 +190,9 @@ UsbGetInterface (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   AlternateSetting,\r
-                  2,\r
+                  1,\r
                   Status\r
                   );\r
 }\r
@@ -241,7 +243,7 @@ UsbSetInterface (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
@@ -283,6 +285,8 @@ UsbGetConfiguration (
   ASSERT (ConfigurationValue != NULL);\r
   ASSERT (Status != NULL);\r
 \r
+  *ConfigurationValue = 0;\r
+\r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
   DevReq.RequestType  = USB_DEV_GET_CONFIGURATION_REQ_TYPE;\r
@@ -293,9 +297,9 @@ UsbGetConfiguration (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   ConfigurationValue,\r
-                  2,\r
+                  1,\r
                   Status\r
                   );\r
 }\r
@@ -343,7 +347,7 @@ UsbSetConfiguration (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
@@ -420,7 +424,7 @@ UsbSetFeature (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
@@ -498,7 +502,7 @@ UsbClearFeature (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
@@ -577,7 +581,7 @@ UsbGetStatus (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   DeviceStatus,\r
                   2,\r
                   Status\r