TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS | EhcInitSched (IN USB2_HC_DEV *Ehc) |
VOID | EhcFreeSched (IN USB2_HC_DEV *Ehc) |
VOID | EhcLinkQhToAsync (IN USB2_HC_DEV *Ehc, IN EHC_QH *Qh) |
VOID | EhcUnlinkQhFromAsync (IN USB2_HC_DEV *Ehc, IN EHC_QH *Qh) |
VOID | EhcLinkQhToPeriod (IN USB2_HC_DEV *Ehc, IN EHC_QH *Qh) |
VOID | EhcUnlinkQhFromPeriod (IN USB2_HC_DEV *Ehc, IN EHC_QH *Qh) |
EFI_STATUS | EhcExecTransfer (IN USB2_HC_DEV *Ehc, IN URB *Urb, IN UINTN TimeOut) |
EFI_STATUS | EhciDelAsyncIntTransfer (IN USB2_HC_DEV *Ehc, IN UINT8 DevAddr, IN UINT8 EpNum, OUT UINT8 *DataToggle) |
VOID | EhciDelAllAsyncIntTransfers (IN USB2_HC_DEV *Ehc) |
URB * | EhciInsertAsyncIntTransfer (IN USB2_HC_DEV *Ehc, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINT8 Toggle, IN UINTN MaxPacket, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Hub, IN UINTN DataLen, IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback, IN VOID *Context, IN UINTN Interval) |
VOID EFIAPI | EhcMonitorAsyncRequests (IN EFI_EVENT Event, IN VOID *Context) |
This file contains the definination for host controller schedule routines.
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EhciSched.h.
EFI_STATUS EhcExecTransfer | ( | IN USB2_HC_DEV * | Ehc, |
IN URB * | Urb, | ||
IN UINTN | TimeOut | ||
) |
Execute the transfer by polling the URB. This is a synchronous operation.
Ehc | The EHCI device. |
Urb | The URB to execute. |
TimeOut | The time to wait before abort, in millisecond. |
EFI_DEVICE_ERROR | The transfer failed due to transfer error. |
EFI_TIMEOUT | The transfer failed due to time out. |
EFI_SUCCESS | The transfer finished OK. |
Execute the transfer by polling the URB. This is a synchronous operation.
Ehc | The EHCI device. |
Urb | The URB to execute. |
TimeOut | The time to wait before abort, in millisecond. |
Definition at line 668 of file EhciSched.c.
VOID EhcFreeSched | ( | IN USB2_HC_DEV * | Ehc | ) |
Free the schedule data. It may be partially initialized.
Ehc | The EHCI device. |
Definition at line 250 of file EhciSched.c.
VOID EhciDelAllAsyncIntTransfers | ( | IN USB2_HC_DEV * | Ehc | ) |
Remove all the asynchronous interrutp transfers.
Ehc | The EHCI device. |
Definition at line 780 of file EhciSched.c.
EFI_STATUS EhciDelAsyncIntTransfer | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT8 | DevAddr, | ||
IN UINT8 | EpNum, | ||
OUT UINT8 * | DataToggle | ||
) |
Delete a single asynchronous interrupt transfer for the device and endpoint.
Ehc | The EHCI device. |
DevAddr | The address of the target device. |
EpNum | The endpoint of the target. |
DataToggle | Return the next data toggle to use. |
EFI_SUCCESS | An asynchronous transfer is removed. |
EFI_NOT_FOUND | No transfer for the device is found. |
Definition at line 733 of file EhciSched.c.
URB * EhciInsertAsyncIntTransfer | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT8 | DevAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINT8 | Toggle, | ||
IN UINTN | MaxPacket, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Hub, | ||
IN UINTN | DataLen, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | Callback, | ||
IN VOID * | Context, | ||
IN UINTN | Interval | ||
) |
Insert a single asynchronous interrupt transfer for the device and endpoint.
Ehc | The EHCI device. |
DevAddr | The device address. |
EpAddr | Endpoint addrress & its direction. |
DevSpeed | The device speed. |
Toggle | Initial data toggle to use. |
MaxPacket | The max packet length of the endpoint. |
Hub | The transaction translator to use. |
DataLen | The length of data buffer. |
Callback | The function to call when data is transferred. |
Context | The context to the callback. |
Interval | The interval for interrupt transfer. |
Definition at line 819 of file EhciSched.c.
EFI_STATUS EhcInitSched | ( | IN USB2_HC_DEV * | Ehc | ) |
Initialize the schedule data structure such as frame list.
Ehc | The EHCI device to init schedule data for. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource to init schedule data. |
EFI_SUCCESS | The schedule data is initialized. |
Initialize the schedule data structure such as frame list.
Ehc | The EHCI device to init schedule data. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource to init schedule data. |
EFI_SUCCESS | The schedule data is initialized. |
Definition at line 102 of file EhciSched.c.
VOID EhcLinkQhToAsync | ( | IN USB2_HC_DEV * | Ehc, |
IN EHC_QH * | Qh | ||
) |
Link the queue head to the asynchronous schedule list. UEFI only supports one CTRL/BULK transfer at a time due to its interfaces. This simplifies the AsynList management: A reclamation header is always linked to the AsyncListAddr, the only active QH is appended to it.
Ehc | The EHCI device. |
Qh | The queue head to link. |
Definition at line 312 of file EhciSched.c.
VOID EhcLinkQhToPeriod | ( | IN USB2_HC_DEV * | Ehc, |
IN EHC_QH * | Qh | ||
) |
Link a queue head for interrupt transfer to the periodic schedule frame list. This code is very much the same as that in UHCI.
Ehc | The EHCI device. |
Qh | The queue head to link. |
Definition at line 389 of file EhciSched.c.
Interrupt transfer periodic check handler.
Event | Interrupt event. |
Context | Pointer to USB2_HC_DEV. |
Definition at line 1021 of file EhciSched.c.
VOID EhcUnlinkQhFromAsync | ( | IN USB2_HC_DEV * | Ehc, |
IN EHC_QH * | Qh | ||
) |
Unlink a queue head from the asynchronous schedule list. Need to synchronize with hardware.
Ehc | The EHCI device. |
Qh | The queue head to unlink. |
Definition at line 345 of file EhciSched.c.
VOID EhcUnlinkQhFromPeriod | ( | IN USB2_HC_DEV * | Ehc, |
IN EHC_QH * | Qh | ||
) |
Unlink an interrupt queue head from the periodic schedule frame list.
Ehc | The EHCI device. |
Qh | The queue head to unlink. |
Definition at line 490 of file EhciSched.c.