Lines Matching defs:ux

391 uhci_add_intr_list(uhci_softc_t *sc, struct uhci_xfer *ux)
394 TAILQ_INSERT_TAIL(&sc->sc_intrhead, ux, ux_list);
398 uhci_del_intr_list(uhci_softc_t *sc, struct uhci_xfer *ux)
401 TAILQ_REMOVE(&sc->sc_intrhead, ux, ux_list);
940 uhci_dump_ii(struct uhci_xfer *ux)
946 if (ux == NULL) {
947 printf("ux NULL\n");
950 pipe = ux->ux_xfer.ux_pipe;
952 printf("ux %p: done=%d pipe=NULL\n", ux, ux->ux_isdone);
956 printf("ux %p: done=%d pipe=%p pipe->up_endpoint=NULL\n",
957 ux, ux->ux_isdone, pipe);
961 printf("ux %p: done=%d pipe=%p pipe->up_dev=NULL\n",
962 ux, ux->ux_isdone, pipe);
967 printf("ux %p: done=%d dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x attr=0x%02x\n",
968 ux, ux->ux_isdone, dev,
979 struct uhci_xfer *ux;
982 TAILQ_FOREACH(ux, &sc->sc_intrhead, ux_list)
983 uhci_dump_ii(ux);
1445 struct uhci_xfer *ux, *nextux;
1465 TAILQ_FOREACH_SAFE(ux, &sc->sc_intrhead, ux_list, nextux) {
1466 uhci_check_intr(sc, ux, &cq);
1474 TAILQ_FOREACH_SAFE(ux, &cq, ux_list, nextux) {
1475 DPRINTF("ux %#jx", (uintptr_t)ux, 0, 0, 0);
1476 usb_transfer_complete(&ux->ux_xfer);
1484 uhci_check_intr(uhci_softc_t *sc, struct uhci_xfer *ux, ux_completeq_t *cqp)
1490 DPRINTFN(15, "ux %#jx", (uintptr_t)ux, 0, 0, 0);
1492 KASSERT(ux != NULL);
1494 struct usbd_xfer *xfer = &ux->ux_xfer;
1501 switch (ux->ux_type) {
1503 fstd = ux->ux_setup;
1504 lstd = ux->ux_stat;
1509 fstd = ux->ux_stdstart;
1510 lstd = ux->ux_stdend;
1534 DPRINTFN(12, "ux=%#jx done", (uintptr_t)ux, 0, 0, 0);
1535 uhci_idone(ux, cqp);
1544 DPRINTFN(12, "active ux=%#jx", (uintptr_t)ux, 0, 0, 0);
1557 DPRINTFN(12, "ux=%#jx std=%#jx still active",
1558 (uintptr_t)ux, (uintptr_t)std, 0, 0);
1571 if ((status & UHCI_TD_SPD) && ux->ux_type == UX_CTRL) {
1577 DPRINTFN(12, "ux=%#jx std=%#jx control status"
1578 "phase needs completion", (uintptr_t)ux,
1579 (uintptr_t)ux->ux_stdstart, 0, 0);
1604 uhci_idone(struct uhci_xfer *ux, ux_completeq_t *cqp)
1607 struct usbd_xfer *xfer = &ux->ux_xfer;
1616 DPRINTFN(12, "ux=%#jx", (uintptr_t)ux, 0, 0, 0);
1627 if (ux->ux_isdone) {
1629 uhci_dump_ii(ux);
1633 KASSERT(!ux->ux_isdone);
1634 KASSERTMSG(!ux->ux_isdone, "xfer %p type %d status %d", xfer,
1635 ux->ux_type, xfer->ux_status);
1636 ux->ux_isdone = true;
1644 DPRINTFN(5, "ux=%#jx isoc ready", (uintptr_t)ux, 0, 0, 0);
1648 n = ux->ux_curframe;
1677 DPRINTFN(10, "ux=%#jx, xfer=%#jx, pipe=%#jx ready", (uintptr_t)ux,
1681 uhci_dump_tds(ux->ux_stdstart);
1688 for (std = ux->ux_stdstart; std != NULL; std = std->link.std) {
1745 uhci_del_intr_list(sc, ux);
1747 TAILQ_INSERT_TAIL(cqp, ux, ux_list);
1750 DPRINTFN(12, "ux=%#jx done", (uintptr_t)ux, 0, 0, 0);
2044 uhci_free_stds(uhci_softc_t *sc, struct uhci_xfer *ux)
2048 DPRINTFN(8, "ux=%#jx", (uintptr_t)ux, 0, 0, 0);
2051 for (size_t i = 0; i < ux->ux_nstd; i++) {
2052 uhci_soft_td_t *std = ux->ux_stds[i];
2060 ux->ux_stds[i]->link.std = sc->sc_freetds;
2237 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2239 KASSERT(ux->ux_type == UX_BULK);
2241 if (ux->ux_nstd) {
2242 uhci_free_stds(sc, ux);
2243 kmem_free(ux->ux_stds, sizeof(uhci_soft_td_t *) * ux->ux_nstd);
2259 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2287 data = ux->ux_stdstart;
2288 ux->ux_stdend = dataend;
2304 KASSERT(ux->ux_isdone);
2306 ux->ux_isdone = false;
2314 uhci_add_intr_list(sc, ux);
2341 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2368 uhci_del_intr_list(sc, ux);
2370 DPRINTF("stop ux=%#jx", (uintptr_t)ux, 0, 0, 0);
2371 for (std = ux->ux_stdstart; std != NULL; std = std->link.std) {
2391 ux->ux_isdone = true;
2452 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2454 KASSERT(ux->ux_type == UX_CTRL);
2456 if (ux->ux_nstd) {
2457 uhci_free_stds(sc, ux);
2458 kmem_free(ux->ux_stds, sizeof(uhci_soft_td_t *) * ux->ux_nstd);
2616 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2631 ux->ux_type = UX_INTR;
2632 ux->ux_nstd = 0;
2633 err = uhci_alloc_std_chain(sc, xfer, len, isread, &ux->ux_stdstart);
2642 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2644 KASSERT(ux->ux_type == UX_INTR);
2646 if (ux->ux_nstd) {
2647 uhci_free_stds(sc, ux);
2648 kmem_free(ux->ux_stds, sizeof(uhci_soft_td_t *) * ux->ux_nstd);
2663 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2687 data = ux->ux_stdstart;
2689 KASSERT(ux->ux_isdone);
2691 ux->ux_isdone = false;
2703 ux->ux_stdend = dataend;
2724 uhci_add_intr_list(sc, ux);
2808 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2812 KASSERT(ux->ux_isdone);
2814 ux->ux_type = UX_ISOC;
2821 struct uhci_xfer *ux __diagused = UHCI_XFER2UXFER(xfer);
2823 KASSERT(ux->ux_type == UX_ISOC);
2839 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2877 ux->ux_curframe = next;
2921 ux->ux_stdstart = std;
2922 ux->ux_stdend = std;
2924 KASSERT(ux->ux_isdone);
2926 ux->ux_isdone = false;
2928 uhci_add_intr_list(sc, ux);
2938 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
2956 n = ux->ux_curframe;
2984 ux->ux_isdone = true;
2987 uhci_del_intr_list(sc, ux);
3134 struct uhci_xfer *ux = UHCI_XFER2UXFER(xfer);
3144 if (ux->ux_stdend == NULL) {
3148 uhci_dump_ii(ux);
3156 usb_syncmem(&ux->ux_stdend->dma,
3157 ux->ux_stdend->offs + offsetof(uhci_td_t, td_status),
3158 sizeof(ux->ux_stdend->td.td_status),
3160 ux->ux_stdend->td.td_status &= htole32(~UHCI_TD_IOC);
3161 usb_syncmem(&ux->ux_stdend->dma,
3162 ux->ux_stdend->offs + offsetof(uhci_td_t, td_status),
3163 sizeof(ux->ux_stdend->td.td_status),