• Home
  • Raw
  • Download

Lines Matching refs:xfer

848 ehci_transfer_intr_enqueue(struct usb_xfer *xfer)  in ehci_transfer_intr_enqueue()  argument
851 if (ehci_check_transfer(xfer)) { in ehci_transfer_intr_enqueue()
857 usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer); in ehci_transfer_intr_enqueue()
860 if (xfer->timeout != 0) { in ehci_transfer_intr_enqueue()
861 usbd_transfer_timeout_ms(xfer, &ehci_timeout, xfer->timeout); in ehci_transfer_intr_enqueue()
1018 ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t xlen) in ehci_data_toggle_update() argument
1024 dt = (actlen / xfer->max_packet_size) & 1; in ehci_data_toggle_update()
1027 rem = actlen % xfer->max_packet_size; in ehci_data_toggle_update()
1036 xfer->endpoint->toggle_next ^= dt; in ehci_data_toggle_update()
1040 ehci_non_isoc_done_sub(struct usb_xfer *xfer) in ehci_non_isoc_done_sub() argument
1042 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_non_isoc_done_sub()
1048 td = (ehci_qtd_t *)xfer->td_transfer_cache; in ehci_non_isoc_done_sub()
1051 if (xfer->aframes != xfer->nframes) { in ehci_non_isoc_done_sub()
1052 usbd_xfer_set_frame_len(xfer, xfer->aframes, 0); in ehci_non_isoc_done_sub()
1069 } else if (xfer->aframes != xfer->nframes) { in ehci_non_isoc_done_sub()
1070 xfer->frlengths[xfer->aframes] += td->len - len; in ehci_non_isoc_done_sub()
1072 ehci_data_toggle_update(xfer, td->len - len, td->len); in ehci_non_isoc_done_sub()
1076 if (((void *)td) == xfer->td_transfer_last) { in ehci_non_isoc_done_sub()
1088 if (xfer->flags_int.short_frames_ok) { in ehci_non_isoc_done_sub()
1107 xfer->td_transfer_cache = td; in ehci_non_isoc_done_sub()
1113 xfer->address, xfer->endpointno, xfer->aframes, in ehci_non_isoc_done_sub()
1125 if ((xfer->xroot->udev->parent_hs_hub != NULL) || in ehci_non_isoc_done_sub()
1126 (xfer->xroot->udev->address != 0)) { in ehci_non_isoc_done_sub()
1137 ehci_non_isoc_done(struct usb_xfer *xfer) in ehci_non_isoc_done() argument
1142 DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", xfer, xfer->endpoint); in ehci_non_isoc_done()
1146 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_non_isoc_done()
1147 ehci_dump_sqtds(sc, xfer->td_transfer_first); in ehci_non_isoc_done()
1152 qh = (ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set]; in ehci_non_isoc_done()
1157 xfer->td_transfer_cache = xfer->td_transfer_first; in ehci_non_isoc_done()
1158 if (xfer->flags_int.control_xfr) { in ehci_non_isoc_done()
1159 if (xfer->flags_int.control_hdr) { in ehci_non_isoc_done()
1160 err = ehci_non_isoc_done_sub(xfer); in ehci_non_isoc_done()
1162 xfer->aframes = 1; in ehci_non_isoc_done()
1164 if (xfer->td_transfer_cache == NULL) { in ehci_non_isoc_done()
1168 while (xfer->aframes != xfer->nframes) { in ehci_non_isoc_done()
1169 err = ehci_non_isoc_done_sub(xfer); in ehci_non_isoc_done()
1170 xfer->aframes++; in ehci_non_isoc_done()
1172 if (xfer->td_transfer_cache == NULL) { in ehci_non_isoc_done()
1177 if (xfer->flags_int.control_xfr && in ehci_non_isoc_done()
1178 !xfer->flags_int.control_act) { in ehci_non_isoc_done()
1179 err = ehci_non_isoc_done_sub(xfer); in ehci_non_isoc_done()
1182 ehci_device_done(xfer, err); in ehci_non_isoc_done()
1193 ehci_check_transfer(struct usb_xfer *xfer) in ehci_check_transfer() argument
1195 const struct usb_pipe_methods *methods = xfer->endpoint->methods; in ehci_check_transfer()
1196 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_check_transfer()
1200 DPRINTFN(13, "xfer=%p checking transfer\n", xfer); in ehci_check_transfer()
1207 td = (ehci_sitd_t *)xfer->td_transfer_last; in ehci_check_transfer()
1213 td = (ehci_sitd_t *)xfer->td_transfer_first; in ehci_check_transfer()
1218 ehci_device_done(xfer, USB_ERR_NORMAL_COMPLETION); in ehci_check_transfer()
1227 td = (ehci_itd_t *)xfer->td_transfer_last; in ehci_check_transfer()
1239 td = (ehci_itd_t *)xfer->td_transfer_first; in ehci_check_transfer()
1252 ehci_device_done(xfer, USB_ERR_NORMAL_COMPLETION); in ehci_check_transfer()
1265 td = (ehci_qtd_t *)xfer->td_transfer_cache; in ehci_check_transfer()
1267 qh = (ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set]; in ehci_check_transfer()
1287 xfer->td_transfer_cache = td; in ehci_check_transfer()
1293 if (((void *)td) == xfer->td_transfer_last) { in ehci_check_transfer()
1307 if (xfer->flags_int.short_frames_ok) { in ehci_check_transfer()
1319 ehci_non_isoc_done(xfer); in ehci_check_transfer()
1324 DPRINTFN(13, "xfer=%p is still active\n", xfer); in ehci_check_transfer()
1348 struct usb_xfer *xfer; in ehci_interrupt_poll() local
1351 TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { in ehci_interrupt_poll()
1355 if (ehci_check_transfer(xfer)) { in ehci_interrupt_poll()
1463 struct usb_xfer *xfer = (struct usb_xfer *)ehci_arg; in ehci_timeout() local
1465 DPRINTF("xfer=%p\n", xfer); in ehci_timeout()
1467 USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED); in ehci_timeout()
1470 ehci_device_done(xfer, USB_ERR_TIMEOUT); in ehci_timeout()
1687 ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_qh_t **qh_last) in ehci_setup_standard_chain() argument
1699 xfer->address, UE_GET_ADDR(xfer->endpointno), in ehci_setup_standard_chain()
1700 xfer->sumlen, usbd_get_speed(xfer->xroot->udev)); in ehci_setup_standard_chain()
1702 temp.average = xfer->max_hc_frame_size; in ehci_setup_standard_chain()
1703 temp.max_frame_size = xfer->max_frame_size; in ehci_setup_standard_chain()
1704 temp.sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_setup_standard_chain()
1707 xfer->flags_int.curr_dma_set ^= 1; in ehci_setup_standard_chain()
1710 td = (ehci_qtd_t *)xfer->td_start[xfer->flags_int.curr_dma_set]; in ehci_setup_standard_chain()
1712 xfer->td_transfer_first = td; in ehci_setup_standard_chain()
1713 xfer->td_transfer_cache = td; in ehci_setup_standard_chain()
1719 temp.setup_alt_next = xfer->flags_int.short_frames_ok; in ehci_setup_standard_chain()
1721 if (xfer->flags_int.control_xfr) { in ehci_setup_standard_chain()
1722 if (xfer->endpoint->toggle_next) { in ehci_setup_standard_chain()
1732 if ((xfer->xroot->udev->parent_hs_hub != NULL) || in ehci_setup_standard_chain()
1733 (xfer->xroot->udev->address != 0)) { in ehci_setup_standard_chain()
1740 if (xfer->flags_int.control_xfr) { in ehci_setup_standard_chain()
1741 if (xfer->flags_int.control_hdr) { in ehci_setup_standard_chain()
1742 xfer->endpoint->toggle_next = 0; in ehci_setup_standard_chain()
1751 temp.len = xfer->frlengths[0]; in ehci_setup_standard_chain()
1752 temp.pc = xfer->frbuffers + 0; in ehci_setup_standard_chain()
1755 if (xfer->nframes == 1) { in ehci_setup_standard_chain()
1757 if (xfer->flags_int.control_act) { in ehci_setup_standard_chain()
1769 while (x != xfer->nframes) { in ehci_setup_standard_chain()
1772 temp.len = xfer->frlengths[x]; in ehci_setup_standard_chain()
1773 temp.pc = xfer->frbuffers + x; in ehci_setup_standard_chain()
1777 if (x == xfer->nframes) { in ehci_setup_standard_chain()
1778 if (xfer->flags_int.control_xfr) { in ehci_setup_standard_chain()
1780 if (xfer->flags_int.control_act) { in ehci_setup_standard_chain()
1803 temp.shortpkt = (xfer->flags.force_short_xfer) ? 0 : 1; in ehci_setup_standard_chain()
1809 (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) ? in ehci_setup_standard_chain()
1820 if (xfer->flags_int.control_xfr && in ehci_setup_standard_chain()
1821 !xfer->flags_int.control_act) { in ehci_setup_standard_chain()
1830 (UE_GET_DIR(xfer->endpointno) == UE_DIR_OUT) ? in ehci_setup_standard_chain()
1858 xfer->td_transfer_last = td; in ehci_setup_standard_chain()
1863 xfer->endpoint->toggle_next); in ehci_setup_standard_chain()
1865 xfer->td_transfer_first); in ehci_setup_standard_chain()
1869 methods = xfer->endpoint->methods; in ehci_setup_standard_chain()
1871 qh = (ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set]; in ehci_setup_standard_chain()
1876 (EHCI_QH_SET_ADDR(xfer->address) | in ehci_setup_standard_chain()
1877 EHCI_QH_SET_ENDPT(UE_GET_ADDR(xfer->endpointno)) | in ehci_setup_standard_chain()
1878 EHCI_QH_SET_MPL(xfer->max_packet_size)); in ehci_setup_standard_chain()
1880 if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_HIGH) { in ehci_setup_standard_chain()
1885 if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_FULL) { in ehci_setup_standard_chain()
1908 (EHCI_QH_SET_MULT(xfer->max_packet_count & 3) | in ehci_setup_standard_chain()
1909 EHCI_QH_SET_CMASK(xfer->endpoint->usb_cmask) | in ehci_setup_standard_chain()
1910 EHCI_QH_SET_SMASK(xfer->endpoint->usb_smask) | in ehci_setup_standard_chain()
1911 EHCI_QH_SET_HUBA(xfer->xroot->udev->hs_hub_addr) | in ehci_setup_standard_chain()
1912 EHCI_QH_SET_PORT(xfer->xroot->udev->hs_port_no)); in ehci_setup_standard_chain()
1919 if (temp.auto_data_toggle && xfer->endpoint->toggle_next) { in ehci_setup_standard_chain()
1926 td = (ehci_qtd_t *)xfer->td_transfer_first; in ehci_setup_standard_chain()
1946 if (xfer->xroot->udev->flags.self_suspended == 0) { in ehci_setup_standard_chain()
1980 ehci_isoc_fs_done(ehci_softc_t *sc, struct usb_xfer *xfer) in ehci_isoc_fs_done() argument
1982 uint32_t nframes = xfer->nframes; in ehci_isoc_fs_done()
1984 uint32_t *plen = xfer->frlengths; in ehci_isoc_fs_done()
1986 ehci_sitd_t *td = (ehci_sitd_t *)xfer->td_transfer_first; in ehci_isoc_fs_done()
1987 ehci_sitd_t **pp_last = &sc->sc_isoc_fs_p_last[xfer->qh_pos]; in ehci_isoc_fs_done()
1990 xfer, xfer->endpoint); in ehci_isoc_fs_done()
2029 xfer->aframes = xfer->nframes; in ehci_isoc_fs_done()
2033 ehci_isoc_hs_done(ehci_softc_t *sc, struct usb_xfer *xfer) in ehci_isoc_hs_done() argument
2035 uint32_t nframes = xfer->nframes; in ehci_isoc_hs_done()
2037 uint32_t *plen = xfer->frlengths; in ehci_isoc_hs_done()
2040 ehci_itd_t *td = (ehci_itd_t *)xfer->td_transfer_first; in ehci_isoc_hs_done()
2041 ehci_itd_t **pp_last = &sc->sc_isoc_hs_p_last[xfer->qh_pos]; in ehci_isoc_hs_done()
2044 xfer, xfer->endpoint); in ehci_isoc_hs_done()
2068 if (xfer->endpoint->usb_smask & (1 << td_no)) { in ehci_isoc_hs_done()
2098 xfer->aframes = xfer->nframes; in ehci_isoc_hs_done()
2105 ehci_device_done(struct usb_xfer *xfer, usb_error_t error) in ehci_device_done() argument
2108 const struct usb_pipe_methods *methods = xfer->endpoint->methods; in ehci_device_done()
2109 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_done()
2114 xfer, xfer->endpoint, error); in ehci_device_done()
2121 xfer->endpoint->toggle_next); in ehci_device_done()
2123 xfer->td_transfer_first); in ehci_device_done()
2128 EHCI_REMOVE_QH((ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set], in ehci_device_done()
2134 EHCI_REMOVE_QH((ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set], in ehci_device_done()
2135 sc->sc_intr_p_last[xfer->qh_pos]); in ehci_device_done()
2142 if (xfer->td_transfer_first && in ehci_device_done()
2143 xfer->td_transfer_last) { in ehci_device_done()
2145 ehci_isoc_fs_done(sc, xfer); in ehci_device_done()
2148 ehci_isoc_hs_done(sc, xfer); in ehci_device_done()
2150 xfer->td_transfer_first = NULL; in ehci_device_done()
2151 xfer->td_transfer_last = NULL; in ehci_device_done()
2154 usbd_transfer_done(xfer, error); in ehci_device_done()
2161 ehci_device_bulk_open(struct usb_xfer *xfer) in ehci_device_bulk_open() argument
2167 ehci_device_bulk_close(struct usb_xfer *xfer) in ehci_device_bulk_close() argument
2169 ehci_device_done(xfer, USB_ERR_CANCELLED); in ehci_device_bulk_close()
2173 ehci_device_bulk_enter(struct usb_xfer *xfer) in ehci_device_bulk_enter() argument
2196 ehci_device_bulk_start(struct usb_xfer *xfer) in ehci_device_bulk_start() argument
2198 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_bulk_start()
2201 ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); in ehci_device_bulk_start()
2204 ehci_transfer_intr_enqueue(xfer); in ehci_device_bulk_start()
2228 ehci_device_ctrl_open(struct usb_xfer *xfer) in ehci_device_ctrl_open() argument
2234 ehci_device_ctrl_close(struct usb_xfer *xfer) in ehci_device_ctrl_close() argument
2236 ehci_device_done(xfer, USB_ERR_CANCELLED); in ehci_device_ctrl_close()
2240 ehci_device_ctrl_enter(struct usb_xfer *xfer) in ehci_device_ctrl_enter() argument
2246 ehci_device_ctrl_start(struct usb_xfer *xfer) in ehci_device_ctrl_start() argument
2248 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_ctrl_start()
2251 ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); in ehci_device_ctrl_start()
2254 ehci_transfer_intr_enqueue(xfer); in ehci_device_ctrl_start()
2269 ehci_device_intr_open(struct usb_xfer *xfer) in ehci_device_intr_open() argument
2271 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_intr_open()
2276 usb_hs_bandwidth_alloc(xfer); in ehci_device_intr_open()
2285 if (xfer->interval >= bit) { in ehci_device_intr_open()
2301 xfer->qh_pos = best; in ehci_device_intr_open()
2304 best, xfer->interval); in ehci_device_intr_open()
2308 ehci_device_intr_close(struct usb_xfer *xfer) in ehci_device_intr_close() argument
2310 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_intr_close()
2312 sc->sc_intr_stat[xfer->qh_pos]--; in ehci_device_intr_close()
2314 ehci_device_done(xfer, USB_ERR_CANCELLED); in ehci_device_intr_close()
2317 usb_hs_bandwidth_free(xfer); in ehci_device_intr_close()
2321 ehci_device_intr_enter(struct usb_xfer *xfer) in ehci_device_intr_enter() argument
2327 ehci_device_intr_start(struct usb_xfer *xfer) in ehci_device_intr_start() argument
2329 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_intr_start()
2332 ehci_setup_standard_chain(xfer, &sc->sc_intr_p_last[xfer->qh_pos]); in ehci_device_intr_start()
2335 ehci_transfer_intr_enqueue(xfer); in ehci_device_intr_start()
2350 ehci_device_isoc_fs_open(struct usb_xfer *xfer) in ehci_device_isoc_fs_open() argument
2352 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_isoc_fs_open()
2358 EHCI_SITD_SET_ADDR(xfer->address) | in ehci_device_isoc_fs_open()
2359 EHCI_SITD_SET_ENDPT(UE_GET_ADDR(xfer->endpointno)) | in ehci_device_isoc_fs_open()
2360 EHCI_SITD_SET_HUBA(xfer->xroot->udev->hs_hub_addr) | in ehci_device_isoc_fs_open()
2361 EHCI_SITD_SET_PORT(xfer->xroot->udev->hs_port_no); in ehci_device_isoc_fs_open()
2363 if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) in ehci_device_isoc_fs_open()
2371 for (td = (ehci_sitd_t *)xfer->td_start[ds]; td; td = td->obj_next) { in ehci_device_isoc_fs_open()
2389 ehci_device_isoc_fs_close(struct usb_xfer *xfer) in ehci_device_isoc_fs_close() argument
2391 ehci_device_done(xfer, USB_ERR_CANCELLED); in ehci_device_isoc_fs_close()
2395 ehci_device_isoc_fs_enter(struct usb_xfer *xfer) in ehci_device_isoc_fs_enter() argument
2398 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_isoc_fs_enter()
2416 xfer, xfer->endpoint->isoc_next, xfer->nframes); in ehci_device_isoc_fs_enter()
2426 buf_offset = (nframes - xfer->endpoint->isoc_next) & in ehci_device_isoc_fs_enter()
2429 if ((xfer->endpoint->is_synced == 0) || in ehci_device_isoc_fs_enter()
2430 (buf_offset < xfer->nframes)) { in ehci_device_isoc_fs_enter()
2437 xfer->endpoint->isoc_next = (nframes + 3) & in ehci_device_isoc_fs_enter()
2439 xfer->endpoint->is_synced = 1; in ehci_device_isoc_fs_enter()
2440 DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); in ehci_device_isoc_fs_enter()
2446 buf_offset = (xfer->endpoint->isoc_next - nframes) & in ehci_device_isoc_fs_enter()
2452 xfer->isoc_time_complete = in ehci_device_isoc_fs_enter()
2454 buf_offset + xfer->nframes; in ehci_device_isoc_fs_enter()
2458 nframes = xfer->nframes; in ehci_device_isoc_fs_enter()
2462 plen = xfer->frlengths; in ehci_device_isoc_fs_enter()
2465 xfer->flags_int.curr_dma_set ^= 1; in ehci_device_isoc_fs_enter()
2468 td = (ehci_sitd_t *)xfer->td_start[xfer->flags_int.curr_dma_set]; in ehci_device_isoc_fs_enter()
2469 xfer->td_transfer_first = td; in ehci_device_isoc_fs_enter()
2471 pp_last = &sc->sc_isoc_fs_p_last[xfer->endpoint->isoc_next]; in ehci_device_isoc_fs_enter()
2475 xfer->qh_pos = xfer->endpoint->isoc_next; in ehci_device_isoc_fs_enter()
2487 if (*plen > xfer->max_frame_size) { in ehci_device_isoc_fs_enter()
2494 xfer->max_frame_size); in ehci_device_isoc_fs_enter()
2497 *plen = xfer->max_frame_size; in ehci_device_isoc_fs_enter()
2502 sa = usbd_fs_isoc_schedule_alloc_slot(xfer, in ehci_device_isoc_fs_enter()
2503 xfer->isoc_time_complete - nframes - 1); in ehci_device_isoc_fs_enter()
2518 usbd_get_page(xfer->frbuffers, buf_offset, &buf_res); in ehci_device_isoc_fs_enter()
2529 usbd_get_page(xfer->frbuffers, buf_offset - 1, in ehci_device_isoc_fs_enter()
2541 if (UE_GET_DIR(xfer->endpointno) == UE_DIR_OUT) { in ehci_device_isoc_fs_enter()
2603 xfer->td_transfer_last = td_last; in ehci_device_isoc_fs_enter()
2606 xfer->endpoint->isoc_next = (pp_last - &sc->sc_isoc_fs_p_last[0]) & in ehci_device_isoc_fs_enter()
2614 xfer->flags_int.can_cancel_immed = 0; in ehci_device_isoc_fs_enter()
2618 ehci_device_isoc_fs_start(struct usb_xfer *xfer) in ehci_device_isoc_fs_start() argument
2625 xfer->flags_int.can_cancel_immed = 0; in ehci_device_isoc_fs_start()
2628 if (xfer->timeout == 0) in ehci_device_isoc_fs_start()
2629 xfer->timeout = 500; /* ms */ in ehci_device_isoc_fs_start()
2632 ehci_transfer_intr_enqueue(xfer); in ehci_device_isoc_fs_start()
2646 ehci_device_isoc_hs_open(struct usb_xfer *xfer) in ehci_device_isoc_hs_open() argument
2648 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); in ehci_device_isoc_hs_open()
2653 usb_hs_bandwidth_alloc(xfer); in ehci_device_isoc_hs_open()
2658 for (td = (ehci_itd_t *)xfer->td_start[ds]; td; td = td->obj_next) { in ehci_device_isoc_hs_open()
2671 EHCI_ITD_SET_ADDR(xfer->address) | in ehci_device_isoc_hs_open()
2672 EHCI_ITD_SET_ENDPT(UE_GET_ADDR(xfer->endpointno))); in ehci_device_isoc_hs_open()
2675 EHCI_ITD_SET_MPL(xfer->max_packet_size & 0x7FF); in ehci_device_isoc_hs_open()
2678 if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) { in ehci_device_isoc_hs_open()
2685 td->itd_bp[2] = htohc32(sc, xfer->max_packet_count & 3); in ehci_device_isoc_hs_open()
2693 ehci_device_isoc_hs_close(struct usb_xfer *xfer) in ehci_device_isoc_hs_close() argument
2695 ehci_device_done(xfer, USB_ERR_CANCELLED); in ehci_device_isoc_hs_close()
2698 usb_hs_bandwidth_free(xfer); in ehci_device_isoc_hs_close()
2702 ehci_device_isoc_hs_enter(struct usb_xfer *xfer) argument
2705 ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
2724 xfer, xfer->endpoint->isoc_next, xfer->nframes,
2725 usbd_xfer_get_fps_shift(xfer));
2735 buf_offset = (nframes - xfer->endpoint->isoc_next) &
2738 if ((xfer->endpoint->is_synced == 0) ||
2739 (buf_offset < (((xfer->nframes << shift) + 7) / 8))) {
2746 xfer->endpoint->isoc_next = (nframes + 3) &
2748 xfer->endpoint->is_synced = 1;
2749 DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next);
2755 buf_offset = (xfer->endpoint->isoc_next - nframes) &
2761 xfer->isoc_time_complete =
2763 (((xfer->nframes << shift) + 7) / 8);
2767 nframes = xfer->nframes;
2772 plen = xfer->frlengths;
2775 xfer->flags_int.curr_dma_set ^= 1;
2778 td = (ehci_itd_t *)xfer->td_start[xfer->flags_int.curr_dma_set];
2779 xfer->td_transfer_first = td;
2781 pp_last = &sc->sc_isoc_hs_p_last[xfer->endpoint->isoc_next];
2785 xfer->qh_pos = xfer->endpoint->isoc_next;
2796 if (*plen > xfer->max_frame_size) {
2802 __FUNCTION__, *plen, xfer->max_frame_size);
2805 *plen = xfer->max_frame_size;
2808 if (xfer->endpoint->usb_smask & (1 << td_no)) {
2836 usbd_get_page(xfer->frbuffers, itd_offset[0], &buf_res);
2864 usbd_get_page(xfer->frbuffers, buf_offset - 1, &buf_res);
2866 usbd_get_page(xfer->frbuffers, itd_offset[x + 1], &buf_res);
2911 xfer->td_transfer_last = td_last;
2914 xfer->endpoint->isoc_next = (pp_last - &sc->sc_isoc_hs_p_last[0]) &
2919 ehci_device_isoc_hs_start(struct usb_xfer *xfer) argument
2922 ehci_transfer_intr_enqueue(xfer);
3423 struct usb_xfer *xfer; local
3432 xfer = parm->curr_xfer;
3476 xfer->flags_int.bdma_enable = 1;
3481 nqtd = ((2 * xfer->nframes) + 1 /* STATUS */
3482 + (xfer->max_data_length / xfer->max_hc_frame_size));
3489 xfer->flags_int.bdma_enable = 1;
3495 nqtd = ((2 * xfer->nframes)
3496 + (xfer->max_data_length / xfer->max_hc_frame_size));
3512 xfer->flags_int.bdma_enable = 1;
3518 nqtd = ((2 * xfer->nframes)
3519 + (xfer->max_data_length / xfer->max_hc_frame_size));
3526 xfer->flags_int.bdma_enable = 1;
3531 nsitd = xfer->nframes;
3538 xfer->flags_int.bdma_enable = 1;
3543 nitd = ((xfer->nframes + 7) / 8) <<
3544 usbd_xfer_get_fps_shift(xfer);
3648 xfer->td_start[xfer->flags_int.curr_dma_set] = last_obj;
3680 xfer->qh_start[xfer->flags_int.curr_dma_set] = last_obj;
3682 if (!xfer->flags_int.curr_dma_set) {
3683 xfer->flags_int.curr_dma_set = 1;
3689 ehci_xfer_unsetup(struct usb_xfer *xfer) argument
3759 struct usb_xfer *xfer; local
3766 TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
3767 if (xfer->xroot->udev == udev) {
3768 methods = xfer->endpoint->methods;
3772 EHCI_APPEND_QH((ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set],
3776 EHCI_APPEND_QH((ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set],
3777 sc->sc_intr_p_last[xfer->qh_pos]);
3791 struct usb_xfer *xfer; local
3798 TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
3800 if (xfer->xroot->udev == udev) {
3802 methods = xfer->endpoint->methods;
3806 EHCI_REMOVE_QH((ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set],
3810 EHCI_REMOVE_QH((ehci_qh_t *)xfer->qh_start[xfer->flags_int.curr_dma_set],
3811 sc->sc_intr_p_last[xfer->qh_pos]);
3872 ehci_start_dma_delay_second(struct usb_xfer *xfer) argument
3874 struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus);
3882 usbd_transfer_timeout_ms(xfer,
3892 ehci_start_dma_delay(struct usb_xfer *xfer) argument
3894 struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus);
3902 usbd_transfer_timeout_ms(xfer,