TianoCore EDK2 master
|
#include "Ehci.h"
Go to the source code of this file.
EHCI transfer scheduling routines.
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EhciSched.c.
BOOLEAN EhcCheckUrbResult | ( | IN USB2_HC_DEV * | Ehc, |
IN URB * | Urb | ||
) |
Check the URB's execution result and update the URB's result accordingly.
Ehc | The EHCI device. |
Urb | The URB to check result. |
Definition at line 549 of file EhciSched.c.
EFI_STATUS EhcCreateHelpQ | ( | IN USB2_HC_DEV * | Ehc | ) |
Create helper QTD/QH for the EHCI device.
Ehc | The EHCI device. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource for helper QTD/QH. |
EFI_SUCCESS | Helper QH/QTD are created. |
Definition at line 23 of file EhciSched.c.
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. |
Definition at line 668 of file EhciSched.c.
EFI_STATUS EhcFlushAsyncIntMap | ( | IN USB2_HC_DEV * | Ehc, |
IN URB * | Urb | ||
) |
Flush data from PCI controller specific address to mapped system memory address.
Ehc | The EHCI device. |
Urb | The URB to unmap. |
EFI_SUCCESS | Success to flush data to mapped system memory. |
EFI_DEVICE_ERROR | Fail to flush data to mapped system memory. |
Definition at line 888 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. |
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.
VOID EhcUpdateAsyncRequest | ( | IN USB2_HC_DEV * | Ehc, |
IN URB * | Urb | ||
) |
Update the queue head for next round of asynchronous transfer.
Ehc | The EHCI device. |
Urb | The URB to update. |
Definition at line 937 of file EhciSched.c.