Pipe descriptor. An USB pipe is described by two structures, for hardware and for software. This is the software part. The hardware part is defined in a driver of the corresponding controller. The hardware part is located immediately before usb_pipe, both are allocated at once by controller-specific code (it knows the total length, which depends on the hardware part). More...
Public Attributes | |
dd | Controller |
dd | NextVirt |
dd | PrevVirt |
dd | BaseList |
dd | LastTD |
dd | NextSibling |
dd | PrevSibling |
dd | NextWait |
MUTEX | Lock |
db | Type |
db | Flags |
dd | DeviceData |
Pipe descriptor. An USB pipe is described by two structures, for hardware and for software. This is the software part. The hardware part is defined in a driver of the corresponding controller. The hardware part is located immediately before usb_pipe, both are allocated at once by controller-specific code (it knows the total length, which depends on the hardware part).
dd usb_pipe::BaseList |
Previous endpoint in the processing list. See also NextVirt field and the description before NextVirt field.
dd usb_pipe::Controller |
dd usb_pipe::DeviceData |
db usb_pipe::Flags |
Type of pipe, one of {CONTROL,ISOCHRONOUS,BULK,INTERRUPT}_PIPE.
dd usb_pipe::LastTD |
Pointer to head of the processing list.
Every pipe has the associated transfer queue, that is, the double-linked list of Transfer Descriptors aka TD. For Control, Bulk and Interrupt endpoints this list consists of usb_gtd structures (GTD = General Transfer Descriptors), for Isochronous endpoints this list consists of usb_itd structures, which are not developed yet. The pipe needs to know only the last TD; the first TD can be obtained as [[pipe.LastTD].NextVirt].
MUTEX usb_pipe::Lock |
dd usb_pipe::NextSibling |
Last TD in the transfer queue.
All opened pipes corresponding to the same physical device are organized in the double-linked list using .NextSibling and .PrevSibling fields. The head of this list is kept in usb_device_data structure (OpenedPipeList). This list is used when the device is disconnected and all pipes for the device should be closed. Also, all pipes closed due to disconnect must remain valid at least until driver-provided disconnect function returns; all should-be-freed-but-not-now pipes for one device are organized in another double-linked list with the head in usb_device_data.ClosedPipeList; this list uses the same link fields, one pipe can never be in both lists.
dd usb_pipe::NextVirt |
Pointer to usb_controller structure corresponding to this pipe. Must be the first dword after hardware part, see *hci_new_device.
Every endpoint is included into one of processing lists: Bulk list contains all Bulk endpoints. Control list contains all Control endpoints. Several Periodic lists serve Interrupt endpoints with different interval.
dd usb_pipe::NextWait |
Previous pipe for the physical device.
When hardware part of pipe is changed, some time is needed before further actions so that hardware reacts on this change. During that time, all changed pipes are organized in single-linked list with the head usb_controller.WaitPipeList* and link field NextWait. Currently there are two possible reasons to change: change of address/packet size in initial configuration, close of the pipe. They are distinguished by USB_FLAG_CLOSED.
dd usb_pipe::PrevSibling |
Next pipe for the physical device.
dd usb_pipe::PrevVirt |
Next endpoint in the processing list. See also PrevVirt field and the description before NextVirt field.
db usb_pipe::Type |
Mutex that guards operations with transfer queue for this pipe.