FreeBSD kernel usb device Code
|
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usb_core.h>
#include <dev/usb/usb_debug.h>
#include <dev/usb/usb_busdma.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/usb_transfer.h>
#include <dev/usb/usb_device.h>
#include <dev/usb/usb_hub.h>
#include <dev/usb/usb_util.h>
#include <dev/usb/usb_controller.h>
#include <dev/usb/usb_bus.h>
#include <dev/usb/controller/ehci.h>
#include <dev/usb/controller/ehcireg.h>
Go to the source code of this file.
Data Structures | |
struct | ehci_std_temp |
Macros | |
#define | USB_DEBUG_VAR ehcidebug |
#define | EHCI_BUS2SC(bus) __containerof(bus, ehci_softc_t, sc_bus) |
#define | EHCI_INTR_ENDPT 1 |
#define | EHCI_APPEND_FS_TD(std, last) (last) = _ehci_append_fs_td(std,last) |
#define | EHCI_APPEND_HS_TD(std, last) (last) = _ehci_append_hs_td(std,last) |
#define | EHCI_APPEND_QH(sqh, last) (last) = _ehci_append_qh(sqh,last) |
#define | EHCI_REMOVE_FS_TD(std, last) (last) = _ehci_remove_fs_td(std,last) |
#define | EHCI_REMOVE_HS_TD(std, last) (last) = _ehci_remove_hs_td(std,last) |
#define | EHCI_REMOVE_QH(sqh, last) (last) = _ehci_remove_qh(sqh,last) |
#define | C(x, y) ((x) | ((y) << 8)) |
Variables | |
static const struct usb_bus_methods | ehci_bus_methods |
static const struct usb_pipe_methods | ehci_device_bulk_methods |
static const struct usb_pipe_methods | ehci_device_ctrl_methods |
static const struct usb_pipe_methods | ehci_device_intr_methods |
static const struct usb_pipe_methods | ehci_device_isoc_fs_methods |
static const struct usb_pipe_methods | ehci_device_isoc_hs_methods |
static const struct usb_device_descriptor | ehci_devd |
static const struct usb_device_qualifier | ehci_odevd |
static const struct ehci_config_desc | ehci_confd |
static const struct usb_hub_descriptor | ehci_hubd |
#define C | ( | x, | |
y | |||
) | ((x) | ((y) << 8)) |
#define EHCI_APPEND_FS_TD | ( | std, | |
last | |||
) | (last) = _ehci_append_fs_td(std,last) |
#define EHCI_APPEND_HS_TD | ( | std, | |
last | |||
) | (last) = _ehci_append_hs_td(std,last) |
#define EHCI_APPEND_QH | ( | sqh, | |
last | |||
) | (last) = _ehci_append_qh(sqh,last) |
#define EHCI_BUS2SC | ( | bus | ) | __containerof(bus, ehci_softc_t, sc_bus) |
#define EHCI_REMOVE_FS_TD | ( | std, | |
last | |||
) | (last) = _ehci_remove_fs_td(std,last) |
#define EHCI_REMOVE_HS_TD | ( | std, | |
last | |||
) | (last) = _ehci_remove_hs_td(std,last) |
#define EHCI_REMOVE_QH | ( | sqh, | |
last | |||
) | (last) = _ehci_remove_qh(sqh,last) |
|
static |
Definition at line 921 of file ehci.c.
References ehci_sitd::next, ehci_sitd::page_cache, ehci_sitd::prev, ehci_sitd::sitd_next, ehci_sitd::sitd_self, and usb_pc_cpu_flush().
|
static |
Definition at line 947 of file ehci.c.
References ehci_itd::itd_next, ehci_itd::itd_self, ehci_itd::next, ehci_itd::page_cache, ehci_itd::prev, and usb_pc_cpu_flush().
Definition at line 973 of file ehci.c.
References ehci_qh::next, ehci_qh::page_cache, ehci_qh::prev, ehci_qh::qh_link, ehci_qh::qh_self, and usb_pc_cpu_flush().
|
static |
Definition at line 1005 of file ehci.c.
References ehci_sitd::next, ehci_sitd::page_cache, ehci_sitd::prev, ehci_sitd::sitd_next, and usb_pc_cpu_flush().
|
static |
Definition at line 1025 of file ehci.c.
References ehci_itd::itd_next, ehci_itd::next, ehci_itd::page_cache, ehci_itd::prev, and usb_pc_cpu_flush().
Definition at line 1045 of file ehci.c.
References ehci_qh::next, ehci_qh::page_cache, ehci_qh::prev, ehci_qh::qh_link, and usb_pc_cpu_flush().
|
static |
Definition at line 1252 of file ehci.c.
References ehci_qtd::alt_next, usb_xfer_root::bus, usb_xfer_flags_int::curr_dma_set, EHCI_BUS2SC, ehci_device_done(), ehci_device_isoc_fs_methods, ehci_device_isoc_hs_methods, EHCI_ITD_ACTIVE, ehci_non_isoc_done(), EHCI_QTD_ACTIVE, EHCI_QTD_GET_BYTES, EHCI_QTD_HALTED, EHCI_SITD_ACTIVE, usb_xfer::endpoint, usb_xfer::flags_int, hc32toh(), htohc32(), ehci_itd::itd_status, usb_endpoint::methods, ehci_qtd::obj_next, ehci_itd::page_cache, ehci_sitd::page_cache, ehci_qtd::page_cache, ehci_qh::page_cache, ehci_qh::qh_qtd, usb_xfer::qh_start, ehci_qtd::qtd_status, ehci_qh_sub::qtd_status, usb_xfer_flags_int::short_frames_ok, ehci_sitd::sitd_status, status, usb_xfer::td_transfer_cache, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, USB_ERR_NORMAL_COMPLETION, usb_pc_cpu_invalidate(), and usb_xfer::xroot.
Referenced by ehci_interrupt_poll(), and ehci_transfer_intr_enqueue().
|
static |
Definition at line 1072 of file ehci.c.
References usb_xfer::endpoint, usb_xfer::max_packet_size, and usb_endpoint::toggle_next.
Referenced by ehci_non_isoc_done_sub().
void ehci_detach | ( | ehci_softc_t * | sc | ) |
Definition at line 553 of file ehci.c.
References DPRINTF, ehci_hcreset(), EHCI_USBINTR, EOWRITE4, ehci_softc::sc_bus, ehci_softc::sc_tmo_pcd, ehci_softc::sc_tmo_poll, USB_BUS_LOCK, USB_BUS_UNLOCK, usb_callout_drain, usb_callout_stop, and usb_pause_mtx().
Referenced by ehci_msm_detach(), ehci_pci_detach(), fsl_ehci_detach(), generic_ehci_detach(), imx_ehci_detach(), and mv_ehci_detach().
|
static |
Definition at line 2205 of file ehci.c.
References ehci_device_done(), and USB_ERR_CANCELLED.
|
static |
|
static |
|
static |
Definition at line 2234 of file ehci.c.
References usb_xfer_root::bus, EHCI_BUS2SC, ehci_doorbell_async(), EHCI_SCFLG_IAADBUG, ehci_setup_standard_chain(), ehci_transfer_intr_enqueue(), ehci_softc::sc_async_p_last, ehci_softc::sc_flags, and usb_xfer::xroot.
|
static |
Definition at line 2272 of file ehci.c.
References ehci_device_done(), and USB_ERR_CANCELLED.
|
static |
|
static |
|
static |
Definition at line 2284 of file ehci.c.
References usb_xfer_root::bus, EHCI_BUS2SC, ehci_setup_standard_chain(), ehci_transfer_intr_enqueue(), ehci_softc::sc_async_p_last, and usb_xfer::xroot.
|
static |
Definition at line 2148 of file ehci.c.
References usb_xfer_root::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, EHCI_BUS2SC, ehci_device_bulk_methods, ehci_device_ctrl_methods, ehci_device_intr_methods, ehci_device_isoc_fs_methods, ehci_device_isoc_hs_methods, ehci_isoc_fs_done(), ehci_isoc_hs_done(), EHCI_REMOVE_QH, usb_xfer::endpoint, error, usb_xfer::flags_int, usb_endpoint::methods, usb_xfer::qh_pos, usb_xfer::qh_start, ehci_softc::sc_async_p_last, ehci_softc::sc_bus, ehci_softc::sc_intr_p_last, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, usb_endpoint::toggle_next, USB_BUS_LOCK_ASSERT, usbd_transfer_done(), and usb_xfer::xroot.
Referenced by ehci_check_transfer(), ehci_device_bulk_close(), ehci_device_ctrl_close(), ehci_device_intr_close(), ehci_device_isoc_fs_close(), ehci_device_isoc_hs_close(), ehci_non_isoc_done(), and ehci_timeout().
|
static |
Definition at line 2346 of file ehci.c.
References usb_xfer_root::bus, EHCI_BUS2SC, ehci_device_done(), usb_xfer::qh_pos, ehci_softc::sc_intr_stat, USB_ERR_CANCELLED, usb_hs_bandwidth_free(), and usb_xfer::xroot.
|
static |
|
static |
Definition at line 2307 of file ehci.c.
References usb_xfer_root::bus, EHCI_BUS2SC, EHCI_VIRTUAL_FRAMELIST_COUNT, usb_xfer::interval, usb_xfer::qh_pos, ehci_softc::sc_intr_stat, usb_hs_bandwidth_alloc(), and usb_xfer::xroot.
|
static |
Definition at line 2365 of file ehci.c.
References usb_xfer_root::bus, EHCI_BUS2SC, ehci_setup_standard_chain(), ehci_transfer_intr_enqueue(), usb_xfer::qh_pos, ehci_softc::sc_intr_p_last, and usb_xfer::xroot.
|
static |
Definition at line 2427 of file ehci.c.
References ehci_device_done(), and USB_ERR_CANCELLED.
|
static |
Definition at line 2433 of file ehci.c.
References usb_xfer_root::bus, usb_xfer_flags_int::can_cancel_immed, usb_xfer_flags_int::curr_dma_set, DPRINTF, EHCI_APPEND_FS_TD, EHCI_BUS2SC, EHCI_FRINDEX, EHCI_SITD_ACTIVE, EHCI_SITD_IOC, EHCI_SITD_SET_CMASK, EHCI_SITD_SET_LEN, EHCI_SITD_SET_SMASK, EHCI_VIRTUAL_FRAMELIST_COUNT, usb_xfer::endpoint, usb_xfer::endpointno, EOREAD4, usb_xfer::flags_int, usb_xfer::frbuffers, usb_xfer::frlengths, htohc32(), usb_endpoint::isoc_next, usb_xfer::isoc_time_complete, usb_xfer::max_frame_size, usb_xfer::nframes, ehci_sitd::obj_next, ehci_sitd::page_cache, plen, usb_xfer::qh_pos, ehci_sitd::sitd_bp, sitd_mask, ehci_sitd::sitd_mask, ehci_sitd::sitd_status, usb_xfer::td_start, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, UE_DIR_OUT, UE_GET_DIR, USB_FS_ISOC_UFRAME_MAX, usb_pc_cpu_flush(), usbd_get_page(), usbd_xfer_get_isochronous_start_frame(), and usb_xfer::xroot.
|
static |
Definition at line 2388 of file ehci.c.
References usb_xfer::address, usb_xfer_root::bus, EHCI_BUS2SC, EHCI_LINK_TERMINATE, EHCI_SITD_SET_ADDR, EHCI_SITD_SET_DIR_IN, EHCI_SITD_SET_ENDPT, EHCI_SITD_SET_HUBA, EHCI_SITD_SET_PORT, usb_xfer::endpointno, usb_device::hs_hub_addr, usb_device::hs_port_no, htohc32(), ehci_sitd::obj_next, ehci_sitd::page_cache, ehci_sitd::sitd_back, sitd_portaddr, ehci_sitd::sitd_portaddr, usb_xfer::td_start, usb_xfer_root::udev, UE_DIR_IN, UE_GET_ADDR, UE_GET_DIR, usb_pc_cpu_flush(), and usb_xfer::xroot.
|
static |
Definition at line 2616 of file ehci.c.
References usb_xfer_flags_int::can_cancel_immed, ehci_transfer_intr_enqueue(), usb_xfer::flags_int, and usb_xfer::timeout.
|
static |
Definition at line 2692 of file ehci.c.
References ehci_device_done(), USB_ERR_CANCELLED, and usb_hs_bandwidth_free().
|
static |
Definition at line 2701 of file ehci.c.
References usb_xfer_root::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, EHCI_APPEND_HS_TD, EHCI_BUS2SC, EHCI_FRINDEX, EHCI_ITD_ACTIVE, EHCI_ITD_IOC, EHCI_ITD_SET_LEN, EHCI_ITD_SET_PG, EHCI_VIRTUAL_FRAMELIST_COUNT, usb_xfer::endpoint, EOREAD4, usb_xfer::flags_int, usb_xfer::frbuffers, usb_xfer::frlengths, htohc32(), usb_endpoint::isoc_next, ehci_itd::itd_bp, itd_offset, ehci_itd::itd_status, usb_xfer::max_frame_size, usb_xfer::nframes, ehci_itd::obj_next, ehci_itd::page_cache, plen, usb_xfer::qh_pos, status, usb_xfer::td_start, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, usb_pc_cpu_flush(), usb_endpoint::usb_smask, usbd_get_page(), usbd_xfer_get_fps_shift(), usbd_xfer_get_isochronous_start_frame(), and usb_xfer::xroot.
|
static |
Definition at line 2645 of file ehci.c.
References usb_xfer::address, usb_xfer_root::bus, EHCI_BUS2SC, EHCI_ITD_SET_ADDR, EHCI_ITD_SET_DIR_IN, EHCI_ITD_SET_ENDPT, EHCI_ITD_SET_MPL, usb_xfer::endpointno, htohc32(), ehci_itd::itd_bp, ehci_itd::itd_status, usb_xfer::max_packet_count, usb_xfer::max_packet_size, ehci_itd::obj_next, ehci_itd::page_cache, usb_xfer::td_start, UE_DIR_IN, UE_GET_ADDR, UE_GET_DIR, usb_hs_bandwidth_alloc(), usb_pc_cpu_flush(), and usb_xfer::xroot.
|
static |
Definition at line 2869 of file ehci.c.
References ehci_transfer_intr_enqueue().
|
static |
Definition at line 3702 of file ehci.c.
References usb_device::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, EHCI_APPEND_QH, EHCI_BUS2SC, ehci_device_bulk_methods, ehci_device_ctrl_methods, ehci_device_intr_methods, usb_xfer::endpoint, usb_xfer::flags_int, usb_bus::intr_q, usb_endpoint::methods, usb_xfer::qh_pos, usb_xfer::qh_start, ehci_softc::sc_async_p_last, ehci_softc::sc_bus, ehci_softc::sc_intr_p_last, usb_xfer_root::udev, USB_BUS_LOCK, USB_BUS_UNLOCK, and usb_xfer::xroot.
|
static |
Definition at line 3734 of file ehci.c.
References usb_device::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, EHCI_BUS2SC, ehci_device_bulk_methods, ehci_device_ctrl_methods, ehci_device_intr_methods, EHCI_REMOVE_QH, usb_xfer::endpoint, usb_xfer::flags_int, usb_bus::intr_q, usb_endpoint::methods, usb_xfer::qh_pos, usb_xfer::qh_start, ehci_softc::sc_async_p_last, ehci_softc::sc_bus, ehci_softc::sc_intr_p_last, usb_xfer_root::udev, USB_BUS_LOCK, USB_BUS_UNLOCK, and usb_xfer::xroot.
|
static |
Definition at line 2985 of file ehci.c.
References DPRINTF, EHCI_PORTSC, EHCI_PS_PO, EOREAD4, EOWRITE4, and index.
Referenced by ehci_roothub_exec().
|
static |
Definition at line 1536 of file ehci.c.
References bus, EHCI_BUS2SC, ehci_interrupt_poll(), ehci_softc::sc_bus, USB_BUS_LOCK, and USB_BUS_UNLOCK.
Referenced by ehci_init(), and ehci_resume().
|
static |
Definition at line 2217 of file ehci.c.
References EHCI_CMD_IAAD, EHCI_USBCMD, EOREAD4, and EOWRITE4.
Referenced by ehci_device_bulk_start(), ehci_start_dma_delay(), and ehci_start_dma_delay_second().
|
static |
Definition at line 3646 of file ehci.c.
References usb_device::address, usb_endpoint_descriptor::bEndpointAddress, usb_endpoint_descriptor::bmAttributes, usb_device::bus, usb_device::device_index, EHCI_BUS2SC, ehci_device_bulk_methods, ehci_device_ctrl_methods, ehci_device_intr_methods, ehci_device_isoc_fs_methods, ehci_device_isoc_hs_methods, usb_device::flags, usb_device::hs_hub_addr, usb_device::hs_port_no, usb_device::hub, usb_endpoint::methods, usb_device::parent_hs_hub, ehci_softc::sc_addr, usb_device::speed, UE_BULK, UE_CONTROL, UE_INTERRUPT, UE_ISOCHRONOUS, UE_XFERTYPE, usb_device_flags::usb_mode, USB_SPEED_FULL, and USB_SPEED_HIGH.
|
static |
uint16_t ehci_get_port_speed_hostc | ( | struct ehci_softc * | sc, |
uint16_t | index | ||
) |
Definition at line 2970 of file ehci.c.
References EHCI_HOSTC, EHCI_HOSTC_PSPD_MASK, EHCI_HOSTC_PSPD_SHIFT, EHCI_PORT_SPEED_HIGH, EHCI_PORT_SPEED_LOW, EOREAD4, index, UPS_HIGH_SPEED, and UPS_LOW_SPEED.
uint16_t ehci_get_port_speed_portsc | ( | struct ehci_softc * | sc, |
uint16_t | index | ||
) |
Definition at line 2955 of file ehci.c.
References EHCI_PORT_SPEED_HIGH, EHCI_PORT_SPEED_LOW, EHCI_PORTSC, EHCI_PORTSC_PSPD_MASK, EHCI_PORTSC_PSPD_SHIFT, EOREAD4, index, UPS_HIGH_SPEED, and UPS_LOW_SPEED.
Referenced by imx_ehci_attach(), and mv_ehci_attach().
|
static |
Definition at line 204 of file ehci.c.
References usb_bus::bdev, ehci_reset(), EHCI_STS_HCH, EHCI_USBCMD, EHCI_USBSTS, EOREAD4, EOWRITE4, ehci_softc::sc_bus, and usb_pause_mtx().
Referenced by ehci_detach(), ehci_init(), ehci_resume(), and ehci_suspend().
usb_error_t ehci_init | ( | ehci_softc_t * | sc | ) |
Definition at line 281 of file ehci.c.
References ehci_hw_softc::async_start_pc, usb_bus::bdev, usb_page_search::buffer, usb_bus::bus_mtx, DPRINTF, ehci_bus_methods, EHCI_CAPLEN_HCIVERSION, EHCI_CAPLENGTH, EHCI_CMD_FLS, ehci_do_poll(), EHCI_FRAMELIST_COUNT, EHCI_HCIVERSION, ehci_hcreset(), EHCI_HCS_N_PORTS, EHCI_HCSPARAMS, ehci_init_sub(), ehci_iterate_hw_softc(), EHCI_LINK_ITD, EHCI_LINK_QH, EHCI_LINK_SITD, EHCI_LINK_TERMINATE, EHCI_NORMAL_INTRS, EHCI_QH_HRECL, EHCI_QH_SET_EPS, EHCI_QH_SET_MULT, EHCI_QH_SPEED_HIGH, EHCI_QTD_HALTED, EHCI_SCFLG_DONTRESET, EHCI_SCFLG_IAADBUG, EHCI_SCFLG_LOSTINTRBUG, EHCI_USBCMD, EHCI_VIRTUAL_FRAMELIST_COUNT, EOREAD4, EREAD4, htohc32(), ehci_hw_softc::intr_start_pc, ehci_hw_softc::isoc_fs_start_pc, ehci_hw_softc::isoc_hs_start_pc, ehci_itd::itd_next, itd_self, ehci_itd::itd_self, usb_bus::methods, ehci_itd::page_cache, ehci_sitd::page_cache, ehci_qh::page_cache, ehci_hw_softc::pframes_pc, ehci_qh::qh_curqtd, ehci_qh::qh_endp, ehci_qh::qh_endphub, ehci_qh::qh_link, ehci_qh::qh_qtd, qh_self, ehci_qh::qh_self, ehci_qh_sub::qtd_altnext, ehci_qh_sub::qtd_next, ehci_qh_sub::qtd_status, ehci_softc::sc_async_p_last, ehci_softc::sc_bus, ehci_softc::sc_eintrs, ehci_softc::sc_flags, ehci_softc::sc_hw, ehci_softc::sc_intr_p_last, ehci_softc::sc_isoc_fs_p_last, ehci_softc::sc_isoc_hs_p_last, ehci_softc::sc_noport, ehci_softc::sc_offs, ehci_softc::sc_terminate_self, ehci_softc::sc_tmo_pcd, ehci_softc::sc_tmo_poll, ehci_sitd::sitd_back, ehci_sitd::sitd_next, ehci_sitd::sitd_self, ehci_hw_softc::terminate_pc, usb_bus_mem_flush_all(), usb_callout_init_mtx, USB_ERR_IOERROR, USB_REV_2_0, usbd_get_page(), and usb_bus::usbrev.
Referenced by ehci_msm_attach(), ehci_pci_attach(), fsl_ehci_attach(), generic_ehci_attach(), imx_ehci_attach(), and mv_ehci_attach().
|
static |
Definition at line 228 of file ehci.c.
References ehci_hw_softc::async_start_pc, usb_bus::bdev, DPRINTF, EHCI_ASYNCLISTADDR, EHCI_CMD_ASE, EHCI_CMD_FLS_M, EHCI_CMD_ITC_1, EHCI_CMD_PSE, EHCI_CMD_RS, EHCI_CONF_CF, EHCI_CONFIGFLAG, EHCI_CTRLDSSEGMENT, EHCI_HCC_64BIT, EHCI_HCCPARAMS, EHCI_LINK_QH, EHCI_PERIODICLISTBASE, EHCI_STS_HCH, EHCI_USBCMD, EHCI_USBINTR, EHCI_USBSTS, EOREAD4, EOWRITE4, EREAD4, ehci_hw_softc::pframes_pc, ehci_softc::sc_bus, ehci_softc::sc_eintrs, ehci_softc::sc_hw, USB_ERR_IOERROR, USB_ERR_NORMAL_COMPLETION, usb_pause_mtx(), and usbd_get_page().
Referenced by ehci_init(), and ehci_resume().
void ehci_interrupt | ( | ehci_softc_t * | sc | ) |
Definition at line 1451 of file ehci.c.
References ehci_interrupt_poll(), ehci_pcd_enable(), ehci_poll_timeout(), ehci_root_intr(), EHCI_SCFLG_LOSTINTRBUG, EHCI_STS_ERRINT, EHCI_STS_HSE, EHCI_STS_IAA, EHCI_STS_INT, EHCI_STS_INTRS, EHCI_STS_PCD, EHCI_USBINTR, EHCI_USBSTS, EOREAD4, EOWRITE4, ehci_softc::sc_bus, ehci_softc::sc_eintrs, ehci_softc::sc_flags, ehci_softc::sc_tmo_pcd, ehci_softc::sc_tmo_poll, status, USB_BUS_LOCK, USB_BUS_UNLOCK, and usb_callout_reset.
Referenced by ehci_msm_attach(), ehci_pci_attach(), fsl_ehci_attach(), generic_ehci_attach(), imx_ehci_attach(), and mv_ehci_attach().
|
static |
Definition at line 1405 of file ehci.c.
References ehci_check_transfer(), usb_bus::intr_q, and ehci_softc::sc_bus.
Referenced by ehci_do_poll(), ehci_interrupt(), and ehci_poll_timeout().
|
static |
Definition at line 2023 of file ehci.c.
References usb_xfer::aframes, DPRINTF, EHCI_REMOVE_FS_TD, EHCI_SITD_GET_LEN, EHCI_VIRTUAL_FRAMELIST_COUNT, usb_xfer::endpoint, usb_xfer::frlengths, hc32toh(), len, usb_xfer::nframes, ehci_sitd::obj_next, ehci_sitd::page_cache, plen, usb_xfer::qh_pos, ehci_softc::sc_isoc_fs_p_last, ehci_sitd::sitd_status, status, usb_xfer::td_transfer_first, and usb_pc_cpu_invalidate().
Referenced by ehci_device_done().
|
static |
Definition at line 2076 of file ehci.c.
References usb_xfer::aframes, DPRINTF, EHCI_ITD_GET_LEN, EHCI_REMOVE_HS_TD, EHCI_VIRTUAL_FRAMELIST_COUNT, usb_xfer::endpoint, usb_xfer::frlengths, hc32toh(), ehci_itd::itd_status, len, usb_xfer::nframes, ehci_itd::obj_next, ehci_itd::page_cache, plen, usb_xfer::qh_pos, ehci_softc::sc_isoc_hs_p_last, status, usb_xfer::td_transfer_first, usb_pc_cpu_invalidate(), and usb_endpoint::usb_smask.
Referenced by ehci_device_done().
void ehci_iterate_hw_softc | ( | struct usb_bus * | bus, |
usb_bus_mem_sub_cb_t * | cb | ||
) |
Definition at line 150 of file ehci.c.
References ehci_hw_softc::async_start_pc, ehci_hw_softc::async_start_pg, bus, EHCI_BUS2SC, EHCI_FRAMELIST_ALIGN, EHCI_FRAMELIST_COUNT, EHCI_ITD_ALIGN, EHCI_QH_ALIGN, EHCI_SITD_ALIGN, EHCI_VIRTUAL_FRAMELIST_COUNT, ehci_hw_softc::intr_start_pc, ehci_hw_softc::intr_start_pg, ehci_hw_softc::isoc_fs_start_pc, ehci_hw_softc::isoc_fs_start_pg, ehci_hw_softc::isoc_hs_start_pc, ehci_hw_softc::isoc_hs_start_pg, ehci_hw_softc::pframes_pc, ehci_hw_softc::pframes_pg, ehci_softc::sc_hw, ehci_hw_softc::terminate_pc, and ehci_hw_softc::terminate_pg.
Referenced by ehci_init().
|
static |
Definition at line 1191 of file ehci.c.
References usb_xfer::aframes, usb_xfer_root::bus, usb_xfer_flags_int::control_act, usb_xfer_flags_int::control_hdr, usb_xfer_flags_int::control_xfr, usb_xfer_flags_int::curr_dma_set, EHCI_BUS2SC, ehci_device_done(), ehci_non_isoc_done_sub(), usb_xfer::endpoint, usb_xfer::flags_int, usb_xfer::nframes, ehci_qh::page_cache, usb_xfer::qh_start, usb_xfer::td_transfer_cache, usb_xfer::td_transfer_first, usb_pc_cpu_invalidate(), and usb_xfer::xroot.
Referenced by ehci_check_transfer().
|
static |
Definition at line 1094 of file ehci.c.
References usb_xfer::address, usb_device::address, usb_xfer::aframes, ehci_qtd::alt_next, usb_xfer_root::bus, DPRINTF, EHCI_BUS2SC, ehci_data_toggle_update(), EHCI_QTD_ACTIVE, EHCI_QTD_BABBLE, EHCI_QTD_BUFERR, EHCI_QTD_GET_BYTES, EHCI_QTD_GET_CERR, EHCI_QTD_HALTED, EHCI_QTD_MISSEDMICRO, EHCI_QTD_PINGSTATE, EHCI_QTD_SPLITXSTATE, EHCI_QTD_STATERRS, EHCI_QTD_XACTERR, usb_xfer::endpointno, usb_xfer::flags_int, usb_xfer::frlengths, hc32toh(), len, ehci_qtd::len, usb_xfer::nframes, ehci_qtd::page_cache, usb_device::parent_hs_hub, ehci_qtd::qtd_status, usb_xfer_flags_int::short_frames_ok, status, usb_xfer::td_transfer_cache, usb_xfer::td_transfer_last, usb_xfer_root::udev, USB_ERR_IOERROR, USB_ERR_NORMAL_COMPLETION, USB_ERR_STALLED, usb_pc_cpu_invalidate(), usbd_xfer_set_frame_len(), and usb_xfer::xroot.
Referenced by ehci_non_isoc_done().
|
static |
Definition at line 1391 of file ehci.c.
References ehci_root_intr(), EHCI_STS_PCD, EHCI_USBINTR, EHCI_USBSTS, EOWRITE4, ehci_softc::sc_bus, ehci_softc::sc_eintrs, and USB_BUS_LOCK_ASSERT.
Referenced by ehci_interrupt().
|
static |
Definition at line 1435 of file ehci.c.
References ehci_interrupt_poll().
Referenced by ehci_interrupt().
usb_error_t ehci_reset | ( | ehci_softc_t * | sc | ) |
Definition at line 184 of file ehci.c.
References usb_bus::bdev, EHCI_CMD_HCRESET, EHCI_USBCMD, EOREAD4, EOWRITE4, ehci_softc::sc_bus, ehci_softc::sc_vendor_post_reset, USB_ERR_IOERROR, and usb_pause_mtx().
Referenced by ehci_hcreset(), and fsl_ehci_attach().
|
static |
Definition at line 584 of file ehci.c.
References ehci_do_poll(), ehci_hcreset(), ehci_init_sub(), and ehci_softc::sc_bus.
Referenced by ehci_set_hw_power_sleep().
|
static |
Definition at line 1996 of file ehci.c.
References DPRINTF, EHCI_PORTSC, EHCI_PS_CLEAR, EOREAD4, ehci_softc::sc_bus, ehci_softc::sc_hub_idata, ehci_softc::sc_noport, uhub_root_intr(), and USB_BUS_LOCK_ASSERT.
Referenced by ehci_interrupt(), and ehci_pcd_enable().
|
static |
Definition at line 2998 of file ehci.c.
References usb_hub_descriptor::bDescLength, usb_bus::bdev, usb_hub_descriptor::bNbrPorts, usb_hub_descriptor::bPwrOn2PwrGood, usb_device::bus, usb_bus::bus_mtx, C, DPRINTF, EHCI_BUS2SC, ehci_confd, ehci_devd, ehci_disown(), EHCI_HCS_P_INDICATOR, EHCI_HCS_PPC, EHCI_HCSPARAMS, ehci_hubd, EHCI_MAX_DEVICES, ehci_odevd, EHCI_PORT_RESET_COMPLETE, EHCI_PORTSC, EHCI_PS_CS, EHCI_PS_CSC, EHCI_PS_FPR, EHCI_PS_IS_LOWSPEED, EHCI_PS_OCA, EHCI_PS_OCC, EHCI_PS_PE, EHCI_PS_PEC, EHCI_PS_PIC, EHCI_PS_PP, EHCI_PS_PR, EHCI_PS_SUSP, EHCI_SCFLG_NORESTERM, EHCI_SCFLG_TT, EOREAD4, EOWRITE4, EREAD4, ehci_hub_desc::hubd, index, len, pptr, ehci_hub_desc::ps, req, ehci_softc::sc_addr, ehci_softc::sc_bus, ehci_softc::sc_conf, ehci_softc::sc_flags, ehci_softc::sc_hub_desc, ehci_softc::sc_isreset, ehci_softc::sc_noport, ehci_softc::sc_vendor, ehci_softc::sc_vendor_get_port_speed, ehci_hub_desc::stat, ehci_hub_desc::temp, UDESC_CONFIG, UDESC_DEVICE, UDESC_DEVICE_QUALIFIER, UDESC_STRING, UDS_SELF_POWERED, UGETW, UHD_PORT_IND, UHD_PWR_INDIVIDUAL, UHD_PWR_NO_SWITCH, UHF_C_PORT_CONNECTION, UHF_C_PORT_ENABLE, UHF_C_PORT_OVER_CURRENT, UHF_C_PORT_RESET, UHF_C_PORT_SUSPEND, UHF_PORT_ENABLE, UHF_PORT_INDICATOR, UHF_PORT_POWER, UHF_PORT_RESET, UHF_PORT_SUSPEND, UHF_PORT_TEST, UPS_C_CONNECT_STATUS, UPS_C_OVERCURRENT_INDICATOR, UPS_C_PORT_ENABLED, UPS_C_PORT_RESET, UPS_C_SUSPEND, UPS_CURRENT_CONNECT_STATUS, UPS_HIGH_SPEED, UPS_OVERCURRENT_INDICATOR, UPS_PORT_ENABLED, UPS_PORT_POWER, UPS_RESET, UPS_SUSPEND, UR_CLEAR_FEATURE, UR_CLEAR_TT_BUFFER, UR_GET_CONFIG, UR_GET_DESCRIPTOR, UR_GET_INTERFACE, UR_GET_STATUS, UR_GET_TT_STATE, UR_RESET_TT, UR_SET_ADDRESS, UR_SET_CONFIG, UR_SET_DESCRIPTOR, UR_SET_FEATURE, UR_SET_INTERFACE, UR_STOP_TT, UR_SYNCH_FRAME, USB_BUS_LOCK_ASSERT, USB_ERR_IOERROR, USB_ERR_TIMEOUT, usb_make_str_desc(), USB_MS_TO_TICKS, usb_pause_mtx(), usb_port_root_reset_delay, USETW, UT_READ_CLASS_DEVICE, UT_READ_CLASS_OTHER, UT_READ_DEVICE, UT_READ_ENDPOINT, UT_READ_INTERFACE, UT_WRITE_CLASS_DEVICE, UT_WRITE_CLASS_OTHER, UT_WRITE_DEVICE, UT_WRITE_ENDPOINT, UT_WRITE_INTERFACE, value, usb_hub_descriptor::wHubCharacteristics, usb_port_status::wPortChange, usb_port_status::wPortStatus, and usb_status::wStatus.
|
static |
Definition at line 3782 of file ehci.c.
References bus, DPRINTF, EHCI_BUS2SC, EHCI_CMD_ASE, EHCI_CMD_PSE, EHCI_USBCMD, EOREAD4, EOWRITE4, USB_BUS_LOCK, USB_BUS_UNLOCK, USB_HW_POWER_BULK, USB_HW_POWER_CONTROL, USB_HW_POWER_INTERRUPT, and USB_HW_POWER_ISOC.
|
static |
Definition at line 3764 of file ehci.c.
References bus, EHCI_BUS2SC, ehci_resume(), ehci_suspend(), state, USB_HW_POWER_RESUME, USB_HW_POWER_SHUTDOWN, and USB_HW_POWER_SUSPEND.
Definition at line 1734 of file ehci.c.
References usb_xfer::address, usb_device::address, ehci_std_temp::auto_data_toggle, ehci_std_temp::average, usb_xfer_root::bus, usb_xfer_flags_int::control_act, usb_xfer_flags_int::control_hdr, usb_xfer_flags_int::control_xfr, usb_xfer_flags_int::curr_dma_set, DPRINTF, EHCI_APPEND_QH, EHCI_BUS2SC, ehci_device_ctrl_methods, ehci_device_intr_methods, EHCI_LINK_TERMINATE, EHCI_QH_CTL, EHCI_QH_DTC, EHCI_QH_SET_ADDR, EHCI_QH_SET_CMASK, EHCI_QH_SET_ENDPT, EHCI_QH_SET_EPS, EHCI_QH_SET_HUBA, EHCI_QH_SET_MPL, EHCI_QH_SET_MULT, EHCI_QH_SET_NRL, EHCI_QH_SET_PORT, EHCI_QH_SET_SMASK, EHCI_QH_SPEED_FULL, EHCI_QH_SPEED_HIGH, EHCI_QH_SPEED_LOW, EHCI_QTD_ACTIVE, EHCI_QTD_PID_IN, EHCI_QTD_PID_OUT, EHCI_QTD_PID_SETUP, EHCI_QTD_SET_CERR, EHCI_QTD_SET_PID, EHCI_QTD_SET_TOGGLE, ehci_setup_standard_chain_sub(), usb_xfer::endpoint, usb_xfer::endpointno, usb_xfer::flags, usb_device::flags, usb_xfer::flags_int, usb_xfer_flags::force_short_xfer, usb_xfer::frbuffers, usb_xfer::frlengths, usb_device::hs_hub_addr, usb_device::hs_port_no, htohc32(), ehci_std_temp::last_frame, ehci_std_temp::len, ehci_std_temp::max_frame_size, usb_xfer::max_frame_size, usb_xfer::max_hc_frame_size, usb_xfer::max_packet_count, usb_xfer::max_packet_size, usb_endpoint::methods, usb_xfer::nframes, ehci_qtd::page_cache, ehci_qh::page_cache, usb_device::parent_hs_hub, ehci_std_temp::pc, ehci_qh::qh_curqtd, qh_endp, ehci_qh::qh_endp, qh_endphub, ehci_qh::qh_endphub, ehci_qh::qh_qtd, usb_xfer::qh_start, ehci_qtd::qtd_altnext, ehci_qh_sub::qtd_altnext, ehci_qh_sub::qtd_buffer, ehci_qh_sub::qtd_buffer_hi, ehci_qtd::qtd_next, ehci_qh_sub::qtd_next, ehci_qtd::qtd_self, ehci_std_temp::qtd_status, ehci_qh_sub::qtd_status, ehci_std_temp::sc, usb_device_flags::self_suspended, ehci_std_temp::setup_alt_next, usb_xfer_flags_int::short_frames_ok, ehci_std_temp::shortpkt, usb_xfer::sumlen, ehci_std_temp::td, ehci_std_temp::td_next, usb_xfer::td_start, usb_xfer::td_transfer_cache, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, usb_endpoint::toggle_next, usb_xfer_root::udev, UE_DIR_IN, UE_DIR_OUT, UE_GET_ADDR, UE_GET_DIR, usb_endpoint::usb_cmask, usb_pc_cpu_flush(), usb_endpoint::usb_smask, USB_SPEED_FULL, USB_SPEED_HIGH, usbd_get_speed(), and usb_xfer::xroot.
Referenced by ehci_device_bulk_start(), ehci_device_ctrl_start(), and ehci_device_intr_start().
|
static |
Definition at line 1546 of file ehci.c.
References ehci_std_temp::auto_data_toggle, ehci_std_temp::average, EHCI_PAGE_SIZE, EHCI_QTD_IOC, EHCI_QTD_NBUFFERS, EHCI_QTD_SET_BYTES, EHCI_QTD_TOGGLE_MASK, htohc32(), ehci_std_temp::last_frame, ehci_std_temp::len, ehci_std_temp::max_frame_size, ehci_std_temp::pc, qtd_altnext, ehci_std_temp::qtd_status, ehci_std_temp::sc, ehci_softc::sc_terminate_self, ehci_std_temp::setup_alt_next, ehci_std_temp::shortpkt, ehci_std_temp::td, ehci_std_temp::td_next, td_next, usb_pc_cpu_flush(), and usbd_get_page().
Referenced by ehci_setup_standard_chain().
|
static |
Definition at line 3836 of file ehci.c.
References usb_xfer_root::bus, DPRINTF, EHCI_BUS2SC, ehci_doorbell_async(), ehci_start_dma_delay_second(), usbd_transfer_timeout_ms(), and usb_xfer::xroot.
|
static |
Definition at line 3816 of file ehci.c.
References usb_xfer_root::bus, DPRINTF, EHCI_BUS2SC, ehci_doorbell_async(), usb_dma_delay_done_cb(), usbd_transfer_timeout_ms(), and usb_xfer::xroot.
Referenced by ehci_start_dma_delay().
|
static |
Definition at line 575 of file ehci.c.
References DPRINTF, and ehci_hcreset().
Referenced by ehci_set_hw_power_sleep().
|
static |
Definition at line 1523 of file ehci.c.
References usb_xfer_root::bus, DPRINTF, ehci_device_done(), USB_BUS_LOCK_ASSERT, USB_ERR_TIMEOUT, and usb_xfer::xroot.
Referenced by ehci_transfer_intr_enqueue().
|
static |
Definition at line 904 of file ehci.c.
References usb_xfer_root::bus, ehci_check_transfer(), ehci_timeout(), usb_bus::intr_q, usb_xfer::timeout, usbd_transfer_enqueue(), usbd_transfer_timeout_ms(), and usb_xfer::xroot.
Referenced by ehci_device_bulk_start(), ehci_device_ctrl_start(), ehci_device_intr_start(), ehci_device_isoc_fs_start(), and ehci_device_isoc_hs_start().
|
static |
Definition at line 3394 of file ehci.c.
References usb_setup_params::buf, usb_page_search::buffer, usb_device::bus, usb_xfer_flags_int::curr_dma_set, usb_setup_params::curr_xfer, EHCI_BUS2SC, ehci_device_bulk_methods, ehci_device_ctrl_methods, ehci_device_intr_methods, ehci_device_isoc_fs_methods, ehci_device_isoc_hs_methods, EHCI_ITD_ALIGN, EHCI_LINK_ITD, EHCI_LINK_QH, EHCI_LINK_SITD, EHCI_QH_ALIGN, EHCI_QTD_ALIGN, EHCI_QTD_PAYLOAD_MAX, EHCI_SITD_ALIGN, usb_setup_params::err, usb_xfer::flags_int, usb_setup_params::hc_max_frame_size, usb_setup_params::hc_max_packet_count, usb_setup_params::hc_max_packet_size, htohc32(), ehci_itd::itd_self, usb_xfer::max_data_length, usb_xfer::max_hc_frame_size, usb_setup_params::methods, n, usb_xfer::nframes, ehci_itd::obj_next, ehci_sitd::obj_next, ehci_qtd::obj_next, ehci_qh::obj_next, ehci_itd::page_cache, ehci_sitd::page_cache, ehci_qtd::page_cache, ehci_qh::page_cache, ehci_qh::qh_self, usb_xfer::qh_start, ehci_qtd::qtd_self, ehci_sitd::sitd_self, usb_setup_params::speed, usb_xfer::td_start, usb_setup_params::udev, USB_ERR_NOMEM, USB_FS_BYTES_PER_HS_UFRAME, usb_pc_cpu_flush(), USB_SPEED_FULL, USB_SPEED_HIGH, usbd_get_page(), usbd_transfer_setup_sub(), usbd_transfer_setup_sub_malloc(), and usbd_xfer_get_fps_shift().
|
static |
|
static |
Definition at line 119 of file ehci.c.
Referenced by ehci_init().
|
static |
Definition at line 2918 of file ehci.c.
Referenced by ehci_roothub_exec().
|
static |
Definition at line 2890 of file ehci.c.
Referenced by ehci_roothub_exec().
|
static |
Definition at line 120 of file ehci.c.
Referenced by ehci_device_done(), ehci_device_resume(), ehci_device_suspend(), ehci_ep_init(), and ehci_xfer_setup().
|
static |
Definition at line 121 of file ehci.c.
Referenced by ehci_device_done(), ehci_device_resume(), ehci_device_suspend(), ehci_ep_init(), ehci_setup_standard_chain(), and ehci_xfer_setup().
|
static |
Definition at line 122 of file ehci.c.
Referenced by ehci_device_done(), ehci_device_resume(), ehci_device_suspend(), ehci_ep_init(), ehci_setup_standard_chain(), and ehci_xfer_setup().
|
static |
Definition at line 123 of file ehci.c.
Referenced by ehci_check_transfer(), ehci_device_done(), ehci_ep_init(), and ehci_xfer_setup().
|
static |
Definition at line 124 of file ehci.c.
Referenced by ehci_check_transfer(), ehci_device_done(), ehci_ep_init(), and ehci_xfer_setup().
|
static |
|
static |
Definition at line 2905 of file ehci.c.
Referenced by ehci_roothub_exec().