]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiUsbLib/UsbDxeLib.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / UefiUsbLib / UsbDxeLib.c
index 33ca21b3c918185a63418d2cc1049090c4fcea19..db98c2f19ad7a5acea657b293f9ed3b5f0ebd143 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -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
@@ -167,7 +167,7 @@ EFIAPI
 UsbGetInterface (\r
   IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
   IN  UINT16                  Interface,\r
-  OUT UINT                  *AlternateSetting,\r
+  OUT UINT16                  *AlternateSetting,\r
   OUT UINT32                  *Status\r
   )\r
 {\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,7 +190,7 @@ UsbGetInterface (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   AlternateSetting,\r
                   1,\r
                   Status\r
@@ -241,7 +243,7 @@ UsbSetInterface (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
@@ -273,7 +275,7 @@ EFI_STATUS
 EFIAPI\r
 UsbGetConfiguration (\r
   IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  OUT UINT                  *ConfigurationValue,\r
+  OUT UINT16                  *ConfigurationValue,\r
   OUT UINT32                  *Status\r
   )\r
 {\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,7 +297,7 @@ UsbGetConfiguration (
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   ConfigurationValue,\r
                   1,\r
                   Status\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
@@ -590,7 +594,7 @@ UsbGetStatus (
 \r
   Retrieve the USB endpoint descriptor specified by UsbIo and EndPoint.\r
   If the USB endpoint descriptor can not be retrieved, then return EFI_NOT_FOUND.\r
-  If the endpoint descriptor is found, then clear the halt fature of this USB endpoint.\r
+  If the endpoint descriptor is found, then clear the halt feature of this USB endpoint.\r
   The status of the transfer is returned in Status.\r
   If UsbIo is NULL, then ASSERT().\r
   If Status is NULL, then ASSERT().\r