summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c')
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c189
1 files changed, 87 insertions, 102 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
index 8804e91244..e002210466 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
@@ -1,5 +1,7 @@
/** @file
+ The UHCI register operation routines.
+
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -9,32 +11,21 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- UhciQueue.c
-
-Abstract:
-
- The UHCI register operation routines.
-
-Revision History
-
-
**/
#include "Uhci.h"
/**
- Map address of request structure buffer
+ Map address of request structure buffer.
- @param Uhc The UHCI device
- @param Request The user request buffer
- @param MappedAddr Mapped address of request
- @param Map Identificaion of this mapping to return
+ @param Uhc The UHCI device.
+ @param Request The user request buffer.
+ @param MappedAddr Mapped address of request.
+ @param Map Identificaion of this mapping to return.
- @return EFI_SUCCESS : Success
- @return EFI_DEVICE_ERROR : Fail to map the user request
+ @return EFI_SUCCESS Success.
+ @return EFI_DEVICE_ERROR Fail to map the user request.
**/
EFI_STATUS
@@ -68,18 +59,18 @@ UhciMapUserRequest (
/**
- Map address of user data buffer
+ Map address of user data buffer.
- @param Uhc The UHCI device
- @param Direction direction of the data transfer
- @param Data The user data buffer
- @param Len Length of the user data
- @param PktId Packet identificaion
- @param MappedAddr mapped address to return
- @param Map identificaion of this mapping to return
+ @param Uhc The UHCI device.
+ @param Direction Direction of the data transfer.
+ @param Data The user data buffer.
+ @param Len Length of the user data.
+ @param PktId Packet identificaion.
+ @param MappedAddr Mapped address to return.
+ @param Map Identificaion of this mapping to return.
- @return EFI_SUCCESS : Success
- @return EFI_DEVICE_ERROR : Fail to map the user data
+ @return EFI_SUCCESS Success.
+ @return EFI_DEVICE_ERROR Fail to map the user data.
**/
EFI_STATUS
@@ -159,14 +150,13 @@ EXIT:
}
-
/**
- Link the TD To QH
+ Link the TD To QH.
- @param Qh The queue head for the TD to link to
- @param Td The TD to link
+ @param Qh The queue head for the TD to link to.
+ @param Td The TD to link.
- @return VOID
+ @return None.
**/
VOID
@@ -183,12 +173,12 @@ UhciLinkTdToQh (
/**
- Unlink TD from the QH
+ Unlink TD from the QH.
- @param Qh The queue head to unlink from
- @param Td The TD to unlink
+ @param Qh The queue head to unlink from.
+ @param Td The TD to unlink.
- @return VOID
+ @return None.
**/
VOID
@@ -205,15 +195,14 @@ UhciUnlinkTdFromQh (
/**
- Append a new TD To the previous TD
+ Append a new TD To the previous TD.
- @param PrevTd Previous UHCI_TD_SW to be linked to
- @param ThisTd TD to link
+ @param PrevTd Previous UHCI_TD_SW to be linked to.
+ @param ThisTd TD to link.
- @return VOID
+ @return None.
**/
-STATIC
VOID
UhciAppendTd (
IN UHCI_TD_SW *PrevTd,
@@ -228,12 +217,12 @@ UhciAppendTd (
/**
- Delete a list of TDs
+ Delete a list of TDs.
- @param Uhc The UHCI device
- @param FirstTd TD link list head
+ @param Uhc The UHCI device.
+ @param FirstTd TD link list head.
- @return VOID
+ @return None.
**/
VOID
@@ -256,12 +245,12 @@ UhciDestoryTds (
/**
- Create an initialize a new queue head
+ Create an initialize a new queue head.
- @param Uhc The UHCI device
- @param Interval The polling interval for the queue
+ @param Uhc The UHCI device.
+ @param Interval The polling interval for the queue.
- @return The newly created queue header
+ @return The newly created queue header.
**/
UHCI_QH_SW *
@@ -289,14 +278,13 @@ UhciCreateQh (
/**
- Create and intialize a TD
+ Create and intialize a TD.
- @param Uhc The UHCI device
+ @param Uhc The UHCI device.
- @return The newly allocated and initialized TD
+ @return The newly allocated and initialized TD.
**/
-STATIC
UHCI_TD_SW *
UhciCreateTd (
IN USB_HC_DEV *Uhc
@@ -319,17 +307,16 @@ UhciCreateTd (
/**
- Create and initialize a TD for Setup Stage of a control transfer
+ Create and initialize a TD for Setup Stage of a control transfer.
- @param Uhc The UHCI device
- @param DevAddr Device address
- @param Request Device request
- @param IsLow Full speed or low speed
+ @param Uhc The UHCI device.
+ @param DevAddr Device address.
+ @param Request Device request.
+ @param IsLow Full speed or low speed.
- @return The created setup Td Pointer
+ @return The created setup Td Pointer.
**/
-STATIC
UHCI_TD_SW *
UhciCreateSetupTd (
IN USB_HC_DEV *Uhc,
@@ -368,21 +355,20 @@ UhciCreateSetupTd (
/**
- Create a TD for data
+ Create a TD for data.
- @param Uhc The UHCI device
- @param DevAddr Device address
- @param Endpoint Endpoint number
- @param DataPtr Data buffer
- @param Len Data length
- @param PktId Packet ID
- @param Toggle Data toggle value
- @param IsLow Full speed or low speed
+ @param Uhc The UHCI device.
+ @param DevAddr Device address.
+ @param Endpoint Endpoint number.
+ @param DataPtr Data buffer.
+ @param Len Data length.
+ @param PktId Packet ID.
+ @param Toggle Data toggle value.
+ @param IsLow Full speed or low speed.
- @return Data Td pointer if success, otherwise NUL
+ @return Data Td pointer if success, otherwise NULL.
**/
-STATIC
UHCI_TD_SW *
UhciCreateDataTd (
IN USB_HC_DEV *Uhc,
@@ -430,17 +416,16 @@ UhciCreateDataTd (
/**
- Create TD for the Status Stage of control transfer
+ Create TD for the Status Stage of control transfer.
- @param Uhc The UHCI device
- @param DevAddr Device address
- @param PktId Packet ID
- @param IsLow Full speed or low speed
+ @param Uhc The UHCI device.
+ @param DevAddr Device address.
+ @param PktId Packet ID.
+ @param IsLow Full speed or low speed.
- @return Status Td Pointer
+ @return Status Td Pointer.
**/
-STATIC
UHCI_TD_SW *
UhciCreateStatusTd (
IN USB_HC_DEV *Uhc,
@@ -479,18 +464,18 @@ UhciCreateStatusTd (
/**
- Create Tds list for Control Transfer
+ Create Tds list for Control Transfer.
- @param Uhc The UHCI device
- @param DeviceAddr The device address
- @param DataPktId Packet Identification of Data Tds
- @param Request A pointer to request structure buffer to transfer
- @param Data A pointer to user data buffer to transfer
- @param DataLen Length of user data to transfer
- @param MaxPacket Maximum packet size for control transfer
- @param IsLow Full speed or low speed
+ @param Uhc The UHCI device.
+ @param DeviceAddr The device address.
+ @param DataPktId Packet Identification of Data Tds.
+ @param Request A pointer to request structure buffer to transfer.
+ @param Data A pointer to user data buffer to transfer.
+ @param DataLen Length of user data to transfer.
+ @param MaxPacket Maximum packet size for control transfer.
+ @param IsLow Full speed or low speed.
- @return The Td list head for the control transfer
+ @return The Td list head for the control transfer.
**/
UHCI_TD_SW *
@@ -610,19 +595,19 @@ FREE_TD:
/**
- Create Tds list for Bulk/Interrupt Transfer
-
- @param Uhc USB_HC_DEV
- @param DevAddr Address of Device
- @param EndPoint Endpoint Number
- @param PktId Packet Identification of Data Tds
- @param Data A pointer to user data buffer to transfer
- @param DataLen Length of user data to transfer
- @param DataToggle Data Toggle Pointer
- @param MaxPacket Maximum packet size for Bulk/Interrupt transfer
- @param IsLow Is Low Speed Device
-
- @return The Tds list head for the bulk transfer
+ Create Tds list for Bulk/Interrupt Transfer.
+
+ @param Uhc USB_HC_DEV.
+ @param DevAddr Address of Device.
+ @param EndPoint Endpoint Number.
+ @param PktId Packet Identification of Data Tds.
+ @param Data A pointer to user data buffer to transfer.
+ @param DataLen Length of user data to transfer.
+ @param DataToggle Data Toggle Pointer.
+ @param MaxPacket Maximum packet size for Bulk/Interrupt transfer.
+ @param IsLow Is Low Speed Device.
+
+ @return The Tds list head for the bulk transfer.
**/
UHCI_TD_SW *