Lines Matching refs:ex
309 ehci_add_intr_list(ehci_softc_t *sc, struct ehci_xfer *ex)
312 TAILQ_INSERT_TAIL(&sc->sc_intrhead, ex, ex_next);
316 ehci_del_intr_list(ehci_softc_t *sc, struct ehci_xfer *ex)
319 TAILQ_REMOVE(&sc->sc_intrhead, ex, ex_next);
877 struct ehci_xfer *ex, *nextex;
898 TAILQ_FOREACH_SAFE(ex, &sc->sc_intrhead, ex_next, nextex) {
899 switch (ex->ex_type) {
903 ehci_check_qh_intr(sc, ex, &cq);
906 ehci_check_itd_intr(sc, ex, &cq);
909 ehci_check_sitd_intr(sc, ex, &cq);
922 TAILQ_FOREACH_SAFE(ex, &cq, ex_next, nextex) {
923 usb_transfer_complete(&ex->ex_xfer);
934 ehci_check_qh_intr(ehci_softc_t *sc, struct ehci_xfer *ex, ex_completeq_t *cq)
943 if (ex->ex_type == EX_CTRL) {
944 fsqtd = ex->ex_setup;
945 lsqtd = ex->ex_status;
947 fsqtd = ex->ex_sqtdstart;
948 lsqtd = ex->ex_sqtdend;
951 "xfer %p xt %d fsqtd %p lsqtd %p", ex, ex->ex_type, fsqtd, lsqtd);
967 DPRINTFN(10, "active ex=%#jx", (uintptr_t)ex, 0, 0, 0);
995 if (ex->ex_type == EX_CTRL) {
1001 DPRINTFN(10, "ex=%#jx std=%#jx still active",
1002 (uintptr_t)ex, (uintptr_t)ex->ex_sqtdstart, 0, 0);
1005 ehci_dump_sqtds(ex->ex_sqtdstart);
1011 DPRINTFN(10, "ex=%#jx done", (uintptr_t)ex, 0, 0, 0);
1012 ehci_idone(ex, cq);
1016 ehci_check_itd_intr(ehci_softc_t *sc, struct ehci_xfer *ex, ex_completeq_t *cq)
1025 if (&ex->ex_xfer != SIMPLEQ_FIRST(&ex->ex_xfer.ux_pipe->up_queue))
1028 KASSERTMSG(ex->ex_itdstart != NULL && ex->ex_itdend != NULL,
1029 "xfer %p fitd %p litd %p", ex, ex->ex_itdstart, ex->ex_itdend);
1031 itd = ex->ex_itdend;
1053 DPRINTFN(10, "ex %#jx itd %#jx still active",
1054 (uintptr_t)ex, (uintptr_t)ex->ex_itdstart, 0, 0);
1057 DPRINTF("ex %#jx done", (uintptr_t)ex, 0, 0, 0);
1058 ehci_idone(ex, cq);
1062 ehci_check_sitd_intr(ehci_softc_t *sc, struct ehci_xfer *ex, ex_completeq_t *cq)
1070 if (&ex->ex_xfer != SIMPLEQ_FIRST(&ex->ex_xfer.ux_pipe->up_queue))
1073 KASSERTMSG(ex->ex_sitdstart != NULL && ex->ex_sitdend != NULL,
1074 "xfer %p fsitd %p lsitd %p", ex, ex->ex_sitdstart, ex->ex_sitdend);
1076 sitd = ex->ex_sitdend;
1094 DPRINTFN(10, "ex=%#jx done", (uintptr_t)ex, 0, 0, 0);
1095 ehci_idone(ex, cq);
1099 ehci_idone(struct ehci_xfer *ex, ex_completeq_t *cq)
1102 struct usbd_xfer *xfer = &ex->ex_xfer;
1111 DPRINTF("ex=%#jx", (uintptr_t)ex, 0, 0, 0);
1122 if (ex->ex_isdone) {
1124 ehci_dump_exfer(ex);
1128 KASSERTMSG(!ex->ex_isdone, "xfer %p type %d status %d", xfer,
1129 ex->ex_type, xfer->ux_status);
1130 ex->ex_isdone = true;
1137 if (ex->ex_type == EX_ISOC) {
1147 ehci_dump_itds(ex->ex_itdstart);
1154 for (itd = ex->ex_itdstart; itd != NULL; itd = itd->xfer_next) {
1190 } else if (ex->ex_type == EX_FS_ISOC) {
1197 for (sitd = ex->ex_sitdstart; sitd != NULL;
1242 KASSERT(ex->ex_type == EX_CTRL || ex->ex_type == EX_INTR ||
1243 ex->ex_type == EX_BULK);
1246 if (ex->ex_type == EX_CTRL) {
1247 fsqtd = ex->ex_setup;
1248 lsqtd = ex->ex_status;
1250 fsqtd = ex->ex_sqtdstart;
1251 lsqtd = ex->ex_sqtdend;
1286 ehci_dump_sqtds(ex->ex_sqtdstart);
1317 ehci_dump_sqtds(ex->ex_sqtdstart);
1343 ehci_del_intr_list(sc, ex);
1344 TAILQ_INSERT_TAIL(cq, ex, ex_next);
1346 DPRINTF("ex=%#jx done", (uintptr_t)ex, 0, 0, 0);
1591 struct ehci_xfer *ex = EHCI_XFER2EXFER(xfer);
1592 ex->ex_isdone = true;
1603 struct ehci_xfer *ex __diagused = EHCI_XFER2EXFER(xfer);
1608 KASSERT(ex->ex_isdone || xfer->ux_status == USBD_NOT_STARTED);
1926 ehci_dump_exfer(struct ehci_xfer *ex)
1930 DPRINTF("ex = %#jx type %jd isdone %jd", (uintptr_t)ex, ex->ex_type,
1931 ex->ex_isdone, 0);
1933 switch (ex->ex_type) {
1936 (uintptr_t)ex->ex_setup, (uintptr_t)ex->ex_data,
1937 (uintptr_t)ex->ex_status, 0);
1942 (uintptr_t)ex->ex_sqtdstart, (uintptr_t)ex->ex_sqtdend,
1947 (uintptr_t)ex->ex_itdstart, (uintptr_t)ex->ex_itdend, 0, 0);
1951 (uintptr_t)ex->ex_sitdstart, (uintptr_t)ex->ex_sitdend,
3649 struct ehci_xfer *ex = EHCI_XFER2EXFER(xfer);
3651 KASSERT(ex->ex_type == EX_CTRL);
3653 ehci_free_sqtd(sc, ex->ex_setup);
3654 ehci_free_sqtd(sc, ex->ex_status);
3655 ehci_free_sqtds(sc, ex);
3656 if (ex->ex_nsqtd)
3657 kmem_free(ex->ex_sqtds,
3658 sizeof(ehci_soft_qtd_t *) * ex->ex_nsqtd);
3918 struct ehci_xfer *ex = EHCI_XFER2EXFER(xfer);
3920 KASSERT(ex->ex_type == EX_BULK);
3922 ehci_free_sqtds(sc, ex);
3923 if (ex->ex_nsqtd)
3924 kmem_free(ex->ex_sqtds, sizeof(ehci_soft_qtd_t *) * ex->ex_nsqtd);
4117 struct ehci_xfer *ex = EHCI_XFER2EXFER(xfer);
4119 KASSERT(ex->ex_type == EX_INTR);
4121 ehci_free_sqtds(sc, ex);
4122 if (ex->ex_nsqtd)
4123 kmem_free(ex->ex_sqtds, sizeof(ehci_soft_qtd_t *) * ex->ex_nsqtd);
4352 struct ehci_xfer *ex = EHCI_XFER2EXFER(xfer);
4354 KASSERT(ex->ex_type == EX_FS_ISOC);
4356 ehci_free_sitd_chain(sc, ex->ex_sitdstart);
4716 struct ehci_xfer *ex = EHCI_XFER2EXFER(xfer);
4718 KASSERT(ex->ex_type == EX_ISOC);
4720 ehci_free_itd_chain(sc, ex->ex_itdstart);