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/ohci.h>
#include <dev/usb/controller/ohcireg.h>
Go to the source code of this file.
Data Structures | |
struct | ohci_std_temp |
Macros | |
#define | USB_DEBUG_VAR ohcidebug |
#define | OHCI_BUS2SC(bus) __containerof(bus, ohci_softc_t, sc_bus) |
#define | OBARR(sc) |
#define | OWRITE1(sc, r, x) do { OBARR(sc); bus_space_write_1((sc)->sc_io_tag, (sc)->sc_io_hdl, (r), (x)); } while (0) |
#define | OWRITE2(sc, r, x) do { OBARR(sc); bus_space_write_2((sc)->sc_io_tag, (sc)->sc_io_hdl, (r), (x)); } while (0) |
#define | OWRITE4(sc, r, x) do { OBARR(sc); bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, (r), (x)); } while (0) |
#define | OREAD1(sc, r) (OBARR(sc), bus_space_read_1((sc)->sc_io_tag, (sc)->sc_io_hdl, (r))) |
#define | OREAD2(sc, r) (OBARR(sc), bus_space_read_2((sc)->sc_io_tag, (sc)->sc_io_hdl, (r))) |
#define | OREAD4(sc, r) (OBARR(sc), bus_space_read_4((sc)->sc_io_tag, (sc)->sc_io_hdl, (r))) |
#define | OHCI_INTR_ENDPT 1 |
#define | OHCI_APPEND_QH(sed, last) (last) = _ohci_append_qh(sed,last) |
#define | OHCI_REMOVE_QH(sed, last) (last) = _ohci_remove_qh(sed,last) |
#define | C(x, y) ((x) | ((y) << 8)) |
Variables | |
static const struct usb_bus_methods | ohci_bus_methods |
static const struct usb_pipe_methods | ohci_device_bulk_methods |
static const struct usb_pipe_methods | ohci_device_ctrl_methods |
static const struct usb_pipe_methods | ohci_device_intr_methods |
static const struct usb_pipe_methods | ohci_device_isoc_methods |
static const struct usb_device_descriptor | ohci_devd |
static const struct ohci_config_desc | ohci_confd |
static const struct usb_hub_descriptor | ohci_hubd |
#define C | ( | x, | |
y | |||
) | ((x) | ((y) << 8)) |
#define OBARR | ( | sc | ) |
#define OHCI_APPEND_QH | ( | sed, | |
last | |||
) | (last) = _ohci_append_qh(sed,last) |
#define OHCI_BUS2SC | ( | bus | ) | __containerof(bus, ohci_softc_t, sc_bus) |
#define OHCI_REMOVE_QH | ( | sed, | |
last | |||
) | (last) = _ohci_remove_qh(sed,last) |
Definition at line 658 of file ohci.c.
References ohci_ed::ed_next, ohci_ed::ed_self, ohci_ed::ed_tailp, ohci_ed::next, ohci_ed::page_cache, ohci_ed::prev, and usb_pc_cpu_flush().
Definition at line 691 of file ohci.c.
References ohci_ed::ed_next, ohci_ed::next, ohci_ed::page_cache, ohci_ed::prev, and usb_pc_cpu_flush().
|
static |
Definition at line 1022 of file ohci.c.
References usb_xfer_flags_int::curr_dma_set, ed_headp, ohci_ed::ed_headp, ed_tailp, ohci_ed::ed_tailp, usb_xfer::endpoint, usb_xfer::flags_int, usb_endpoint::methods, ohci_check_transfer_sub(), ohci_device_isoc_methods, OHCI_HALTED, ohci_isoc_done(), ohci_non_isoc_done(), OHCI_TOGGLECARRY, ohci_ed::page_cache, usb_xfer::qh_start, usb_xfer_flags_int::short_frames_ok, usb_xfer::td_transfer_cache, usb_endpoint::toggle_next, and usb_pc_cpu_invalidate().
Referenced by ohci_interrupt_poll(), and ohci_transfer_intr_enqueue().
|
static |
Definition at line 940 of file ohci.c.
References usb_xfer_root::bus, usb_xfer_flags_int::curr_dma_set, ohci_ed::ed_headp, usb_xfer::endpoint, usb_device::flags, usb_xfer::flags_int, usb_endpoint::methods, OHCI_BLF, OHCI_BUS2SC, OHCI_CLF, OHCI_COMMAND_STATUS, ohci_device_bulk_methods, ohci_device_ctrl_methods, OHCI_TD_GET_CC, OHCI_TD_NEXT_END, OWRITE4, ohci_ed::page_cache, ohci_td::page_cache, usb_xfer::qh_start, usb_device_flags::self_suspended, ohci_td::td_cbp, td_flags, ohci_td::td_flags, td_next, ohci_td::td_next, ohci_td::td_self, usb_xfer::td_transfer_cache, usb_xfer::td_transfer_last, usb_xfer_root::udev, usb_pc_cpu_flush(), usb_pc_cpu_invalidate(), and usb_xfer::xroot.
Referenced by ohci_check_transfer().
|
static |
Definition at line 172 of file ohci.c.
References usb_bus::bdev, ohci_hw_softc::bulk_start_pc, ohci_hw_softc::ctrl_start_pc, DPRINTF, ohci_hw_softc::hcca_pc, OHCI_ALL_INTRS, OHCI_BLE, OHCI_BULK_HEAD_ED, OHCI_CBSR_MASK, OHCI_CLE, OHCI_COMMAND_STATUS, OHCI_CONTROL, OHCI_CONTROL_HEAD_ED, OHCI_ENABLE_POWER_DELAY, OHCI_FIT, OHCI_FM_INTERVAL, OHCI_FSMPS, OHCI_GET_IVAL, OHCI_GET_NDP, OHCI_HCCA, OHCI_HCFS_MASK, OHCI_HCFS_OPERATIONAL, OHCI_HCFS_RESET, OHCI_HCFS_SUSPEND, OHCI_HCR, OHCI_IE, OHCI_INTERRUPT_DISABLE, OHCI_INTERRUPT_ENABLE, OHCI_IR, OHCI_LES, OHCI_LPSC, OHCI_MIE, OHCI_NOCP, OHCI_OCR, OHCI_PERIODIC, OHCI_PERIODIC_START, OHCI_PLE, OHCI_RATIO_1_4, OHCI_READ_DESC_DELAY, OHCI_RH_DESCRIPTOR_A, OHCI_RH_STATUS, OREAD4, OWRITE4, ohci_softc::sc_bus, ohci_softc::sc_eintrs, ohci_softc::sc_hw, ohci_softc::sc_noport, USB_BUS_RESET_DELAY, USB_ERR_IOERROR, USB_ERR_NORMAL_COMPLETION, USB_MS_TO_TICKS, usb_pause_mtx(), and usbd_get_page().
Referenced by ohci_init(), ohci_resume(), and ohci_suspend().
void ohci_detach | ( | struct ohci_softc * | sc | ) |
Definition at line 437 of file ohci.c.
References OHCI_ALL_INTRS, OHCI_CONTROL, OHCI_HCFS_RESET, OHCI_INTERRUPT_DISABLE, OWRITE4, ohci_softc::sc_bus, ohci_softc::sc_tmo_rhsc, USB_BUS_LOCK, USB_BUS_UNLOCK, usb_callout_drain, usb_callout_stop, and usb_pause_mtx().
Referenced by generic_ohci_detach(), and ohci_pci_detach().
|
static |
Definition at line 1659 of file ohci.c.
References ohci_device_done(), and USB_ERR_CANCELLED.
|
static |
|
static |
|
static |
Definition at line 1671 of file ohci.c.
References usb_xfer_root::bus, OHCI_BUS2SC, ohci_setup_standard_chain(), ohci_transfer_intr_enqueue(), ohci_softc::sc_bulk_p_last, and usb_xfer::xroot.
|
static |
Definition at line 1700 of file ohci.c.
References ohci_device_done(), and USB_ERR_CANCELLED.
|
static |
|
static |
|
static |
Definition at line 1712 of file ohci.c.
References usb_xfer_root::bus, OHCI_BUS2SC, ohci_setup_standard_chain(), ohci_transfer_intr_enqueue(), ohci_softc::sc_ctrl_p_last, and usb_xfer::xroot.
|
static |
Definition at line 1615 of file ohci.c.
References usb_xfer_root::bus, usb_xfer_flags_int::curr_dma_set, usb_xfer::endpoint, error, usb_xfer::flags_int, usb_endpoint::methods, OHCI_BUS2SC, ohci_device_bulk_methods, ohci_device_ctrl_methods, ohci_device_intr_methods, ohci_device_isoc_methods, OHCI_REMOVE_QH, ohci_ed::page_cache, usb_xfer::qh_pos, usb_xfer::qh_start, ohci_softc::sc_bulk_p_last, ohci_softc::sc_bus, ohci_softc::sc_ctrl_p_last, ohci_softc::sc_intr_p_last, ohci_softc::sc_isoc_p_last, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, USB_BUS_LOCK_ASSERT, usb_pc_cpu_invalidate(), usbd_transfer_done(), and usb_xfer::xroot.
Referenced by ohci_device_bulk_close(), ohci_device_ctrl_close(), ohci_device_intr_close(), ohci_device_isoc_close(), ohci_isoc_done(), ohci_non_isoc_done(), and ohci_timeout().
|
static |
Definition at line 1768 of file ohci.c.
References usb_xfer_root::bus, OHCI_BUS2SC, ohci_device_done(), usb_xfer::qh_pos, ohci_softc::sc_intr_stat, USB_ERR_CANCELLED, and usb_xfer::xroot.
|
static |
|
static |
Definition at line 1735 of file ohci.c.
References usb_xfer_root::bus, usb_xfer::interval, OHCI_BUS2SC, OHCI_NO_EDS, usb_xfer::qh_pos, ohci_softc::sc_intr_stat, and usb_xfer::xroot.
|
static |
Definition at line 1784 of file ohci.c.
References usb_xfer_root::bus, OHCI_BUS2SC, ohci_setup_standard_chain(), ohci_transfer_intr_enqueue(), usb_xfer::qh_pos, ohci_softc::sc_intr_p_last, and usb_xfer::xroot.
|
static |
Definition at line 1813 of file ohci.c.
References ohci_device_done(), and USB_ERR_CANCELLED.
|
static |
Definition at line 1820 of file ohci.c.
References usb_xfer::address, usb_xfer_root::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, ed_flags, ohci_ed::ed_flags, ohci_ed::ed_headp, usb_xfer::endpoint, usb_xfer::endpointno, usb_xfer::flags_int, ohci_itd::frames, usb_xfer::frbuffers, usb_xfer::frlengths, ohci_hcca::hcca_frame_number, usb_endpoint::isoc_next, ohci_itd::itd_be, ohci_itd::itd_bp0, ohci_itd::itd_flags, ohci_itd::itd_next, itd_offset, ohci_itd::itd_offset, ohci_itd::itd_self, usb_xfer::max_frame_size, usb_xfer::nframes, ohci_itd::obj_next, OHCI_APPEND_QH, OHCI_BUS2SC, OHCI_ED_DIR_IN, OHCI_ED_DIR_OUT, OHCI_ED_FORMAT_ISO, OHCI_ED_SET_EN, OHCI_ED_SET_FA, OHCI_ED_SET_MAXP, OHCI_ED_SPEED, ohci_get_hcca(), OHCI_ITD_MK_OFFS, OHCI_ITD_NOCC, OHCI_ITD_NOFFSET, OHCI_ITD_NOINTR, OHCI_ITD_SET_DI, OHCI_ITD_SET_FC, OHCI_ITD_SET_SF, OHCI_PAGE, OHCI_PAGE_MASK, ohci_itd::page_cache, plen, usb_xfer::qh_start, usb_device::speed, usb_xfer::td_start, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, usb_xfer_root::udev, UE_DIR_IN, UE_GET_ADDR, UE_GET_DIR, usb_pc_cpu_flush(), USB_SPEED_LOW, usbd_get_page(), usbd_xfer_get_isochronous_start_frame(), and usb_xfer::xroot.
|
static |
|
static |
Definition at line 1975 of file ohci.c.
References ohci_transfer_intr_enqueue().
|
static |
Definition at line 2553 of file ohci.c.
References usb_device::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, usb_xfer::endpoint, usb_xfer::flags_int, usb_bus::intr_q, usb_endpoint::methods, OHCI_APPEND_QH, OHCI_BLF, OHCI_BUS2SC, OHCI_CLF, OHCI_COMMAND_STATUS, ohci_device_bulk_methods, ohci_device_ctrl_methods, ohci_device_intr_methods, OWRITE4, usb_xfer::qh_pos, usb_xfer::qh_start, ohci_softc::sc_bulk_p_last, ohci_softc::sc_bus, ohci_softc::sc_ctrl_p_last, ohci_softc::sc_intr_p_last, usb_xfer_root::udev, USB_BUS_LOCK, USB_BUS_UNLOCK, and usb_xfer::xroot.
|
static |
Definition at line 2589 of file ohci.c.
References usb_device::bus, usb_xfer_flags_int::curr_dma_set, DPRINTF, usb_xfer::endpoint, usb_xfer::flags_int, usb_bus::intr_q, usb_endpoint::methods, OHCI_BUS2SC, ohci_device_bulk_methods, ohci_device_ctrl_methods, ohci_device_intr_methods, OHCI_REMOVE_QH, usb_xfer::qh_pos, usb_xfer::qh_start, ohci_softc::sc_bulk_p_last, ohci_softc::sc_bus, ohci_softc::sc_ctrl_p_last, ohci_softc::sc_intr_p_last, usb_xfer_root::udev, USB_BUS_LOCK, USB_BUS_UNLOCK, and usb_xfer::xroot.
|
static |
Definition at line 1231 of file ohci.c.
References bus, OHCI_BUS2SC, ohci_interrupt_poll(), ohci_softc::sc_bus, USB_BUS_LOCK, and USB_BUS_UNLOCK.
Referenced by ohci_init(), and ohci_resume().
|
static |
Definition at line 2503 of file ohci.c.
References usb_device::address, usb_endpoint_descriptor::bEndpointAddress, usb_endpoint_descriptor::bmAttributes, usb_device::bus, usb_device::device_index, usb_device::flags, usb_endpoint::methods, OHCI_BUS2SC, ohci_device_bulk_methods, ohci_device_ctrl_methods, ohci_device_intr_methods, ohci_device_isoc_methods, ohci_softc::sc_addr, usb_device::speed, UE_BULK, UE_CONTROL, UE_INTERRUPT, UE_ISOCHRONOUS, UE_XFERTYPE, usb_device_flags::usb_mode, and USB_SPEED_FULL.
|
static |
|
static |
Definition at line 141 of file ohci.c.
References ohci_hw_softc::hcca_pc, ohci_softc::sc_hcca_p, ohci_softc::sc_hw, and usb_pc_cpu_invalidate().
Referenced by ohci_device_isoc_enter(), and ohci_interrupt().
usb_error_t ohci_init | ( | ohci_softc_t * | sc | ) |
Definition at line 323 of file ohci.c.
References usb_page_search::buffer, ohci_hw_softc::bulk_start_pc, usb_bus::bus_mtx, ohci_hw_softc::ctrl_start_pc, DPRINTF, ohci_ed::ed_next, ed_self, ohci_ed::ed_self, ohci_hcca::hcca_interrupt_table, ohci_hw_softc::hcca_pc, ohci_hw_softc::intr_start_pc, ohci_hw_softc::isoc_start_pc, usb_bus::methods, ohci_ed::next, ohci_bus_methods, ohci_controller_init(), ohci_do_poll(), ohci_init_ed(), ohci_iterate_hw_softc(), OHCI_NO_EDS, OHCI_NO_INTRS, OHCI_NORMAL_INTRS, ohci_softc::sc_bulk_p_last, ohci_softc::sc_bus, ohci_softc::sc_ctrl_p_last, ohci_softc::sc_eintrs, ohci_softc::sc_hcca_p, ohci_softc::sc_hw, ohci_softc::sc_intr_p_last, ohci_softc::sc_isoc_p_last, ohci_softc::sc_tmo_rhsc, usb_bus_mem_flush_all(), usb_callout_init_mtx, USB_ERR_INVAL, USB_ERR_NORMAL_COMPLETION, USB_REV_1_0, usbd_get_page(), and usb_bus::usbrev.
Referenced by generic_ohci_attach(), and ohci_pci_attach().
|
static |
Definition at line 306 of file ohci.c.
References usb_page_search::buffer, ohci_ed::ed_flags, ohci_ed::ed_self, OHCI_ED_SKIP, ohci_ed::page_cache, and usbd_get_page().
Referenced by ohci_init().
void ohci_interrupt | ( | ohci_softc_t * | sc | ) |
Definition at line 1106 of file ohci.c.
References ohci_hcca::hcca_done_head, ohci_hw_softc::hcca_pc, OHCI_CONTROL, OHCI_DONE_INTRS, ohci_get_hcca(), OHCI_HCFS_RESET, OHCI_INTERRUPT_DISABLE, ohci_interrupt_poll(), OHCI_INTERRUPT_STATUS, OHCI_RD, OHCI_RHSC, ohci_rhsc_enable(), ohci_root_intr(), OHCI_SO, OHCI_UE, OHCI_WDH, OREAD4, OWRITE4, ohci_softc::sc_bus, ohci_softc::sc_eintrs, ohci_softc::sc_hw, ohci_softc::sc_tmo_rhsc, status, USB_BUS_LOCK, USB_BUS_UNLOCK, usb_callout_reset, and usb_pc_cpu_flush().
Referenced by generic_ohci_attach(), and ohci_pci_attach().
|
static |
Definition at line 1082 of file ohci.c.
References usb_bus::intr_q, ohci_check_transfer(), and ohci_softc::sc_bus.
Referenced by ohci_do_poll(), and ohci_interrupt().
|
static |
Definition at line 718 of file ohci.c.
References usb_xfer::aframes, DPRINTF, ohci_itd::frames, usb_xfer::frlengths, ohci_itd::itd_offset, len, usb_xfer::nframes, ohci_itd::obj_next, OHCI_CC_NOT_ACCESSED, ohci_device_done(), ohci_itd::page_cache, plen, usb_xfer::td_transfer_first, usb_xfer::td_transfer_last, USB_ERR_NORMAL_COMPLETION, and usb_pc_cpu_invalidate().
Referenced by ohci_check_transfer().
void ohci_iterate_hw_softc | ( | struct usb_bus * | bus, |
usb_bus_mem_sub_cb_t * | cb | ||
) |
Definition at line 148 of file ohci.c.
References ohci_hw_softc::bulk_start_pc, ohci_hw_softc::bulk_start_pg, bus, ohci_hw_softc::ctrl_start_pc, ohci_hw_softc::ctrl_start_pg, ohci_hw_softc::hcca_pc, ohci_hw_softc::hcca_pg, ohci_hw_softc::intr_start_pc, ohci_hw_softc::intr_start_pg, ohci_hw_softc::isoc_start_pc, ohci_hw_softc::isoc_start_pg, OHCI_BUS2SC, OHCI_ED_ALIGN, OHCI_HCCA_ALIGN, OHCI_NO_EDS, and ohci_softc::sc_hw.
Referenced by ohci_init().
|
static |
Definition at line 892 of file ohci.c.
References usb_xfer::aframes, usb_xfer_flags_int::control_act, usb_xfer_flags_int::control_hdr, usb_xfer_flags_int::control_xfr, usb_xfer::endpoint, usb_xfer::flags_int, usb_xfer::nframes, ohci_device_done(), ohci_non_isoc_done_sub(), usb_xfer::td_transfer_cache, and usb_xfer::td_transfer_first.
Referenced by ohci_check_transfer().
|
static |
Definition at line 800 of file ohci.c.
References usb_xfer::aframes, ohci_td::alt_next, usb_xfer::flags_int, usb_xfer::frlengths, ohci_td::len, usb_xfer::nframes, OHCI_CC_STALL, OHCI_PAGE, OHCI_PAGE_OFFSET, OHCI_PAGE_SIZE, OHCI_TD_GET_CC, ohci_td::page_cache, usb_xfer_flags_int::short_frames_ok, ohci_td::td_be, ohci_td::td_cbp, td_flags, ohci_td::td_flags, usb_xfer::td_transfer_cache, usb_xfer::td_transfer_last, USB_ERR_IOERROR, USB_ERR_NORMAL_COMPLETION, USB_ERR_STALLED, usb_pc_cpu_invalidate(), and usbd_xfer_set_frame_len().
Referenced by ohci_non_isoc_done().
|
static |
Definition at line 469 of file ohci.c.
References DPRINTF, ohci_controller_init(), ohci_do_poll(), and ohci_softc::sc_bus.
Referenced by ohci_set_hw_power_sleep().
|
static |
Definition at line 1066 of file ohci.c.
References OHCI_INTERRUPT_ENABLE, OHCI_INTERRUPT_STATUS, OHCI_RHSC, ohci_root_intr(), OWRITE4, ohci_softc::sc_bus, ohci_softc::sc_eintrs, and USB_BUS_LOCK_ASSERT.
Referenced by ohci_interrupt(), and ohci_roothub_exec().
|
static |
Definition at line 1579 of file ohci.c.
References DPRINTF, OHCI_RH_PORT_STATUS, OHCI_RH_STATUS, OREAD4, ohci_softc::sc_bus, ohci_softc::sc_hub_idata, ohci_softc::sc_noport, uhub_root_intr(), and USB_BUS_LOCK_ASSERT.
Referenced by ohci_interrupt(), and ohci_rhsc_enable().
|
static |
Definition at line 2049 of file ohci.c.
References usb_hub_descriptor::bDescLength, usb_hub_descriptor::bNbrPorts, usb_hub_descriptor::bPwrOn2PwrGood, usb_device::bus, usb_bus::bus_mtx, C, usb_hub_descriptor::DeviceRemovable, ohci_hub_desc::hubd, index, len, OHCI_BUS2SC, ohci_confd, ohci_devd, OHCI_GET_POTPGT, ohci_hubd, OHCI_MAX_DEVICES, OHCI_NPS, OHCI_PSM, OHCI_RH_DESCRIPTOR_A, OHCI_RH_DESCRIPTOR_B, OHCI_RH_PORT_STATUS, ohci_rhsc_enable(), OREAD4, OWRITE4, pptr, ohci_hub_desc::ps, req, ohci_softc::sc_addr, ohci_softc::sc_bus, ohci_softc::sc_conf, ohci_softc::sc_hub_desc, ohci_softc::sc_noport, ohci_softc::sc_vendor, ohci_hub_desc::stat, ohci_hub_desc::temp, UDESC_CONFIG, UDESC_DEVICE, UDESC_STRING, UDS_SELF_POWERED, UGETW, UHD_PWR_GANGED, 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_POWER, UHF_PORT_RESET, UHF_PORT_SUSPEND, UPS_C_CONNECT_STATUS, UPS_C_OVERCURRENT_INDICATOR, UPS_C_PORT_ENABLED, UPS_C_PORT_RESET, UPS_C_SUSPEND, UPS_CURRENT_CONNECT_STATUS, UPS_LOW_SPEED, UPS_OVERCURRENT_INDICATOR, UPS_PORT_ENABLED, UPS_PORT_POWER, UPS_RESET, UPS_SUSPEND, UR_CLEAR_FEATURE, UR_GET_CONFIG, UR_GET_DESCRIPTOR, UR_GET_INTERFACE, UR_GET_STATUS, UR_SET_ADDRESS, UR_SET_CONFIG, UR_SET_DESCRIPTOR, UR_SET_FEATURE, UR_SET_INTERFACE, 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 2641 of file ohci.c.
References bus, DPRINTF, OHCI_BLE, OHCI_BUS2SC, OHCI_CLE, OHCI_CONTROL, OHCI_IE, OHCI_PLE, OREAD4, OWRITE4, 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 2623 of file ohci.c.
References bus, OHCI_BUS2SC, ohci_resume(), ohci_suspend(), state, USB_HW_POWER_RESUME, USB_HW_POWER_SHUTDOWN, and USB_HW_POWER_SUSPEND.
Definition at line 1380 of file ohci.c.
References usb_xfer::address, ohci_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, ed_flags, ohci_ed::ed_flags, ohci_ed::ed_headp, 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, ohci_std_temp::last_frame, ohci_std_temp::len, ohci_std_temp::max_frame_size, usb_xfer::max_frame_size, usb_xfer::max_hc_frame_size, usb_endpoint::methods, usb_xfer::nframes, OHCI_APPEND_QH, OHCI_BLF, OHCI_BUS2SC, OHCI_CLF, OHCI_COMMAND_STATUS, ohci_device_bulk_methods, ohci_device_ctrl_methods, OHCI_ED_DIR_TD, OHCI_ED_FORMAT_GEN, OHCI_ED_SET_EN, OHCI_ED_SET_FA, OHCI_ED_SET_MAXP, OHCI_ED_SPEED, ohci_setup_standard_chain_sub(), OHCI_TD_IN, OHCI_TD_INTR_MASK, OHCI_TD_NEXT_END, OHCI_TD_NOCC, OHCI_TD_NOINTR, OHCI_TD_OUT, OHCI_TD_SET_DI, OHCI_TD_SETUP, OHCI_TD_TOGGLE_0, OHCI_TD_TOGGLE_1, OWRITE4, ohci_ed::page_cache, ohci_td::page_cache, ohci_std_temp::pc, usb_xfer::qh_start, usb_device_flags::self_suspended, ohci_std_temp::setup_alt_next, usb_xfer_flags_int::short_frames_ok, ohci_std_temp::shortpkt, usb_device::speed, usb_xfer::sumlen, ohci_std_temp::td, ohci_std_temp::td_flags, ohci_td::td_flags, ohci_std_temp::td_next, ohci_td::td_next, ohci_td::td_self, 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_GET_ADDR, UE_GET_DIR, usb_pc_cpu_flush(), USB_SPEED_LOW, usbd_get_speed(), and usb_xfer::xroot.
Referenced by ohci_device_bulk_start(), ohci_device_ctrl_start(), and ohci_device_intr_start().
|
static |
Definition at line 1241 of file ohci.c.
References ohci_std_temp::average, ohci_std_temp::last_frame, ohci_std_temp::len, ohci_std_temp::max_frame_size, OHCI_TD_DP_MASK, OHCI_TD_IN, OHCI_TD_INTR_MASK, OHCI_TD_NEXT_END, OHCI_TD_R, OHCI_TD_SET_DI, OHCI_TD_TOGGLE_MASK, ohci_std_temp::pc, ohci_std_temp::setup_alt_next, ohci_std_temp::shortpkt, ohci_std_temp::td, ohci_std_temp::td_flags, ohci_std_temp::td_next, td_next, usb_pc_cpu_flush(), and usbd_get_page().
Referenced by ohci_setup_standard_chain().
|
static |
Definition at line 455 of file ohci.c.
References DPRINTF, and ohci_controller_init().
Referenced by ohci_set_hw_power_sleep().
|
static |
Definition at line 1218 of file ohci.c.
References usb_xfer_root::bus, DPRINTF, ohci_device_done(), USB_BUS_LOCK_ASSERT, USB_ERR_TIMEOUT, and usb_xfer::xroot.
Referenced by ohci_transfer_intr_enqueue().
|
static |
Definition at line 641 of file ohci.c.
References usb_xfer_root::bus, usb_bus::intr_q, ohci_check_transfer(), ohci_timeout(), usb_xfer::timeout, usbd_transfer_enqueue(), usbd_transfer_timeout_ms(), and usb_xfer::xroot.
Referenced by ohci_device_bulk_start(), ohci_device_ctrl_start(), ohci_device_intr_start(), and ohci_device_isoc_start().
|
static |
Definition at line 2342 of file ohci.c.
References usb_setup_params::buf, usb_page_search::buffer, usb_xfer_flags_int::curr_dma_set, usb_setup_params::curr_xfer, ohci_ed::ed_self, 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, ohci_itd::itd_self, usb_xfer::max_data_length, usb_xfer::max_hc_frame_size, usb_setup_params::methods, n, usb_xfer::nframes, ohci_ed::obj_next, ohci_td::obj_next, ohci_itd::obj_next, ohci_device_bulk_methods, ohci_device_ctrl_methods, ohci_device_intr_methods, ohci_device_isoc_methods, OHCI_ED_ALIGN, OHCI_ITD_ALIGN, OHCI_ITD_NOFFSET, OHCI_PAGE_SIZE, OHCI_TD_ALIGN, ohci_ed::page_cache, ohci_td::page_cache, ohci_itd::page_cache, usb_xfer::qh_start, ohci_td::td_self, usb_xfer::td_start, USB_ERR_NOMEM, usb_pc_cpu_flush(), usbd_get_page(), usbd_transfer_setup_sub(), and usbd_transfer_setup_sub_malloc().
|
static |
|
static |
Definition at line 115 of file ohci.c.
Referenced by ohci_init().
|
static |
Definition at line 2011 of file ohci.c.
Referenced by ohci_roothub_exec().
|
static |
Definition at line 1996 of file ohci.c.
Referenced by ohci_roothub_exec().
|
static |
Definition at line 116 of file ohci.c.
Referenced by ohci_check_transfer_sub(), ohci_device_done(), ohci_device_resume(), ohci_device_suspend(), ohci_ep_init(), ohci_setup_standard_chain(), and ohci_xfer_setup().
|
static |
Definition at line 117 of file ohci.c.
Referenced by ohci_check_transfer_sub(), ohci_device_done(), ohci_device_resume(), ohci_device_suspend(), ohci_ep_init(), ohci_setup_standard_chain(), and ohci_xfer_setup().
|
static |
Definition at line 118 of file ohci.c.
Referenced by ohci_device_done(), ohci_device_resume(), ohci_device_suspend(), ohci_ep_init(), and ohci_xfer_setup().
|
static |
Definition at line 119 of file ohci.c.
Referenced by ohci_check_transfer(), ohci_device_done(), ohci_ep_init(), and ohci_xfer_setup().
|
static |