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
/**\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
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
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
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
\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
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
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
if (Interval == 0) {\r
return 1;\r
}\r
- \r
+\r
//\r
// Find the index (1 based) of the highest non-zero bit\r
//\r
\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
\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
\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
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
\r
Len += Qtd->DataLen;\r
}\r
- \r
+\r
//\r
// Insert the status packet for control transfer\r
//\r
\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
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
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