Description, Status code returned – Intel Extensible Firmware Interface User Manual

Page 582

Advertising
background image

Extensible Firmware Interface Specification

14-42 12/01/02

Version

1.10

Description

This function allows a USB device driver to communicate with the USB device through a Control
Transfer. There are three control transfer types according to the data phase. If the

Direction

parameter is

EfiUsbNoData

,

Data

is

NULL

, and

DataLength

is 0, then no data phase exists

for the control transfer. If the

Direction

parameter is

EfiUsbDataOut

, then

Data

specifies

the data to be transmitted to the device, and

DataLength

specifies the number of bytes to transfer

to the device. In this case there is an OUT DATA stage followed by a SETUP stage. If the

Direction

parameter is

EfiUsbDataIn

, then

Data

specifies the data that is received from the

device, and

DataLength

specifies the number of bytes to receive from the device. In this case

there is an IN DATA stage followed by a SETUP stage. After the USB transfer has completed
successfully,

EFI_SUCCESS

is returned. If the transfer cannot be completed due to timeout, then

EFI_TIMEOUT

is returned. If an error other than timeout occurs during the USB transfer, then

EFI_DEVICE_ERROR

is returned and the detailed status code is returned in

Status

.

Status Code Returned

EFI_SUCCESS

The control transfer has been successfully executed.

EFI_INVALID_PARAMETER

The parameter

Direction

is not valid.

EFI_INVALID_PARAMETER

Request

is

NULL

.

EFI-INVALID_PARAMETER

Status

is

NULL

.

EFI_OUT_OF_RESOURCES

The request could not be completed due to a lack of resources.

EFI_TIMEOUT

The control transfer fails due to timeout.

EFI_DEVICE_ERROR

The transfer failed. The transfer status is returned in

Status

.

Advertising