]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciPei / EhciUrb.c
index baacf5d56080ec615b1a8efbb7ea64111396f51d..a766f70a9dda74bf51e686c237540a1258f752c8 100644 (file)
@@ -2,8 +2,8 @@
 PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid\r
 which is used to enable recovery function from USB Drivers.\r
 \r
-Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
-  \r
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
+\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
 of the BSD License which accompanies this distribution.  The\r
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
   Delete a single asynchronous interrupt transfer for\r
   the device and endpoint.\r
-  \r
+\r
   @param  Ehc         The EHCI device.\r
   @param  Data        Current data not associated with a QTD.\r
   @param  DataLen     The length of the data.\r
@@ -96,7 +96,7 @@ EhcCreateQtd (
       Len += ThisBufLen;\r
       Data += ThisBufLen;\r
     }\r
-    \r
+\r
     //\r
     // Need to fix the last pointer if the Qtd can't hold all the\r
     // user's data to make sure that the length is in the unit of\r
@@ -120,7 +120,7 @@ EhcCreateQtd (
     1. SplitXState in the Status field.\r
     2. Microframe S-mask.\r
     3. Microframe C-mask.\r
-  \r
+\r
   @param  Ep    The queue head's related endpoint.\r
   @param  QhHw  The queue head to initialize.\r
 \r
@@ -142,7 +142,7 @@ EhcInitIntQh (
     QhHw->SMask = QH_MICROFRAME_0;\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // For low/full speed device, the transfer must go through\r
   // the split transaction. Need to update three fields\r
@@ -160,7 +160,7 @@ EhcInitIntQh (
 \r
 /**\r
   Allocate and initialize a EHCI queue head.\r
-  \r
+\r
   @param  Ehci      The EHCI device.\r
   @param  Ep        The endpoint to create queue head for.\r
 \r
@@ -185,7 +185,7 @@ EhcCreateQh (
   Qh->Signature       = EHC_QH_SIG;\r
   Qh->NextQh          = NULL;\r
   Qh->Interval        = Ep->PollRate;\r
-  \r
+\r
   InitializeListHead (&Qh->Qtds);\r
 \r
   QhHw                = &Qh->QhHw;\r
@@ -250,7 +250,7 @@ EhcCreateQh (
   can't support high speed endpoint with a interval less\r
   than 8 microframe because interval is specified in\r
   the unit of ms (millisecond).\r
-  \r
+\r
   @param Interval       The interval to convert.\r
 \r
   @retval The converted interval.\r
@@ -266,7 +266,7 @@ EhcConvertPollRate (
   if (Interval == 0) {\r
     return 1;\r
   }\r
-  \r
+\r
   //\r
   // Find the index (1 based) of the highest non-zero bit\r
   //\r
@@ -282,7 +282,7 @@ EhcConvertPollRate (
 \r
 /**\r
   Free a list of QTDs.\r
-  \r
+\r
   @param  Ehc         The EHCI device.\r
   @param  Qtds        The list head of the QTD.\r
 \r
@@ -307,7 +307,7 @@ EhcFreeQtds (
 \r
 /**\r
   Free an allocated URB. It is possible for it to be partially inited.\r
-  \r
+\r
   @param  Ehc         The EHCI device.\r
   @param  Urb         The URB to free.\r
 \r
@@ -338,7 +338,7 @@ EhcFreeUrb (
 \r
 /**\r
   Create a list of QTDs for the URB.\r
-  \r
+\r
   @param  Ehc         The EHCI device.\r
   @param  Urb         The URB to create QTDs for.\r
 \r
@@ -380,7 +380,7 @@ EhcCreateQtds (
   if (Ep->Direction == EfiUsbDataIn) {\r
     AlterNext = QTD_LINK (Ehc->ShortReadStop, FALSE);\r
   }\r
-  \r
+\r
   //\r
   // Build the Setup and status packets for control transfer\r
   //\r
@@ -457,7 +457,7 @@ EhcCreateQtds (
 \r
     Len += Qtd->DataLen;\r
   }\r
-  \r
+\r
   //\r
   // Insert the status packet for control transfer\r
   //\r
@@ -496,7 +496,7 @@ ON_ERROR:
 \r
 /**\r
   Create a new URB and its associated QTD.\r
-  \r
+\r
   @param  Ehc               The EHCI device.\r
   @param  DevAddr           The device address.\r
   @param  EpAddr            Endpoint addrress & its direction.\r
@@ -519,7 +519,7 @@ PEI_URB *
 EhcCreateUrb (\r
   IN PEI_USB2_HC_DEV                    *Ehc,\r
   IN UINT8                              DevAddr,\r
-  IN UINT8                              EpAddr,  \r
+  IN UINT8                              EpAddr,\r
   IN UINT8                              DevSpeed,\r
   IN UINT8                              Toggle,\r
   IN UINTN                              MaxPacket,\r
@@ -540,7 +540,7 @@ EhcCreateUrb (
   UINTN                         Len;\r
   PEI_URB                       *Urb;\r
   VOID                          *Map;\r
-  \r
+\r
   Urb = Ehc->Urb;\r
   Urb->Signature  = EHC_URB_SIG;\r
   InitializeListHead (&Urb->UrbList);\r