FreeBSD kernel usb device Code
usb_controller.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usb_bus_methods
 
struct  usb_pipe_methods
 
struct  usb_hw_ep_profile
 

Macros

#define USB_BUS_DMA_TAG_MAX   8
 
#define USB_HW_POWER_CONTROL   0x01
 
#define USB_HW_POWER_BULK   0x02
 
#define USB_HW_POWER_INTERRUPT   0x04
 
#define USB_HW_POWER_ISOC   0x08
 
#define USB_HW_POWER_NON_ROOT_HUB   0x10
 
#define USB_HW_POWER_SUSPEND   0x20
 
#define USB_HW_POWER_RESUME   0x40
 
#define USB_HW_POWER_SHUTDOWN   0x60
 

Typedefs

typedef void() usb_bus_mem_sub_cb_t(struct usb_bus *bus, struct usb_page_cache *pc, struct usb_page *pg, usb_size_t size, usb_size_t align)
 
typedef void() usb_bus_mem_cb_t(struct usb_bus *bus, usb_bus_mem_sub_cb_t *scb)
 

Functions

void usb_bus_mem_flush_all (struct usb_bus *bus, usb_bus_mem_cb_t *cb)
 
uint8_t usb_bus_mem_alloc_all (struct usb_bus *bus, bus_dma_tag_t dmat, usb_bus_mem_cb_t *cb)
 
void usb_bus_mem_free_all (struct usb_bus *bus, usb_bus_mem_cb_t *cb)
 
uint16_t usb_isoc_time_expand (struct usb_bus *bus, uint16_t isoc_time_curr)
 
void usb_bus_reset_async_locked (struct usb_bus *bus)
 

Macro Definition Documentation

◆ USB_BUS_DMA_TAG_MAX

#define USB_BUS_DMA_TAG_MAX   8

Definition at line 34 of file usb_controller.h.

◆ USB_HW_POWER_BULK

#define USB_HW_POWER_BULK   0x02

Definition at line 79 of file usb_controller.h.

◆ USB_HW_POWER_CONTROL

#define USB_HW_POWER_CONTROL   0x01

Definition at line 74 of file usb_controller.h.

◆ USB_HW_POWER_INTERRUPT

#define USB_HW_POWER_INTERRUPT   0x04

Definition at line 84 of file usb_controller.h.

◆ USB_HW_POWER_ISOC

#define USB_HW_POWER_ISOC   0x08

Definition at line 89 of file usb_controller.h.

◆ USB_HW_POWER_NON_ROOT_HUB

#define USB_HW_POWER_NON_ROOT_HUB   0x10

Definition at line 94 of file usb_controller.h.

◆ USB_HW_POWER_RESUME

#define USB_HW_POWER_RESUME   0x40

Definition at line 102 of file usb_controller.h.

◆ USB_HW_POWER_SHUTDOWN

#define USB_HW_POWER_SHUTDOWN   0x60

Definition at line 106 of file usb_controller.h.

◆ USB_HW_POWER_SUSPEND

#define USB_HW_POWER_SUSPEND   0x20

Definition at line 98 of file usb_controller.h.

Typedef Documentation

◆ usb_bus_mem_cb_t

typedef void() usb_bus_mem_cb_t(struct usb_bus *bus, usb_bus_mem_sub_cb_t *scb)

Definition at line 50 of file usb_controller.h.

◆ usb_bus_mem_sub_cb_t

typedef void() usb_bus_mem_sub_cb_t(struct usb_bus *bus, struct usb_page_cache *pc, struct usb_page *pg, usb_size_t size, usb_size_t align)

Definition at line 49 of file usb_controller.h.

Function Documentation

◆ usb_bus_mem_alloc_all()

◆ usb_bus_mem_flush_all()

void usb_bus_mem_flush_all ( struct usb_bus bus,
usb_bus_mem_cb_t cb 
)

Referenced by ehci_init(), ohci_init(), uhci_init(), and xhci_start_controller().

Here is the caller graph for this function:

◆ usb_bus_mem_free_all()

void usb_bus_mem_free_all ( struct usb_bus bus,
usb_bus_mem_cb_t cb 
)

◆ usb_bus_reset_async_locked()

void usb_bus_reset_async_locked ( struct usb_bus bus)

Definition at line 309 of file usb_controller.c.

References bus, DPRINTF, USB_BUS_LOCK_ASSERT, and usb_proc_msignal().

Referenced by xhci_do_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usb_isoc_time_expand()

uint16_t usb_isoc_time_expand ( struct usb_bus bus,
uint16_t  isoc_time_curr 
)

Definition at line 2037 of file usb_hub.c.

References usb_device::bus, usb_bus::isoc_time_last, USB_BUS_LOCK_ASSERT, and USB_ISOC_TIME_MAX.

Referenced by usbd_xfer_get_isochronous_start_frame().

Here is the caller graph for this function: