Home | History | Annotate | Download | only in usb

Lines Matching defs:std

465 	ohci_soft_td_t *std;
477 kmem_alloc(sizeof(*std) * OHCI_TD_CHUNK, KM_SLEEP);
492 std = &stds[i];
493 std->td = KERNADDR(&dma, offs);
494 std->physaddr = DMAADDR(&dma, offs);
495 std->dma = dma;
496 std->offs = offs;
497 std->nexttd = sc->sc_freetds;
499 sc->sc_freetds = std;
503 std = sc->sc_freetds;
504 sc->sc_freetds = std->nexttd;
507 memset(std->td, 0, sizeof(*std->td));
508 std->nexttd = NULL;
509 std->xfer = NULL;
510 std->held = NULL;
512 return std;
516 ohci_free_std_locked(ohci_softc_t *sc, ohci_soft_td_t *std)
521 std->nexttd = sc->sc_freetds;
522 sc->sc_freetds = std;
526 ohci_free_std(ohci_softc_t *sc, ohci_soft_td_t *std)
530 ohci_free_std_locked(sc, std);
567 DPRINTFN(10, "xfer=%#jx new std=%#jx held at %#jx", (uintptr_t)ox,
588 ohci_soft_td_t *std = ox->ox_stds[i];
589 if (std == NULL)
591 ohci_free_std_locked(sc, std);
1447 ohci_soft_td_t *std, *sdone, *stdnext;
1482 std = ohci_hash_find_td(sc, done);
1483 if (std != NULL) {
1484 usb_syncmem(&std->dma, std->offs, sizeof(*std->td),
1486 std->dnext = sdone;
1487 done = O32TOH(std->td->td_nexttd);
1488 sdone = std;
1489 DPRINTFN(10, "add TD %#jx", (uintptr_t)std, 0, 0, 0);
1513 for (std = sdone; std; std = std->dnext)
1514 ohci_dump_td(sc, std);
1519 for (std = sdone; std; std = stdnext) {
1520 stdnext = std->dnext;
1521 if (std->held == NULL) {
1522 DPRINTFN(10, "std=%#jx held is null", (uintptr_t)std,
1524 ohci_hash_rem_td(sc, std);
1525 ohci_free_std_locked(sc, std);
1529 xfer = std->xfer;
1530 DPRINTFN(10, "std=%#jx xfer=%#jx hcpriv=%#jx dnext=%#jx",
1531 (uintptr_t)std, (uintptr_t)xfer,
1549 len = std->len;
1550 if (std->td->td_cbp != 0)
1551 len -= O32TOH(std->td->td_be) -
1552 O32TOH(std->td->td_cbp) + 1;
1553 DPRINTFN(10, "len=%jd, flags=%#jx", len, std->flags, 0, 0);
1554 if (std->flags & OHCI_ADD_LEN)
1557 cc = OHCI_TD_GET_CC(O32TOH(std->td->td_flags));
1559 ohci_hash_rem_td(sc, std);
1560 if (std->flags & OHCI_CALL_DONE) {
1576 for (p = std; p->xfer == xfer; p = n) {
1896 ohci_hash_add_td(ohci_softc_t *sc, ohci_soft_td_t *std)
1898 int h = HASH(std->physaddr);
1902 LIST_INSERT_HEAD(&sc->sc_hash_tds[h], std, hnext);
1907 ohci_hash_rem_td(ohci_softc_t *sc, ohci_soft_td_t *std)
1912 LIST_REMOVE(std, hnext);
1919 ohci_soft_td_t *std;
1921 for (std = LIST_FIRST(&sc->sc_hash_tds[h]);
1922 std != NULL;
1923 std = LIST_NEXT(std, hnext))
1924 if (std->physaddr == a)
1925 return std;
1976 ohci_dump_tds(ohci_softc_t *sc, ohci_soft_td_t *std)
1978 for (; std; std = std->nexttd) {
1979 ohci_dump_td(sc, std);
1980 KASSERTMSG(std->nexttd == NULL || std != std->nexttd,
1981 "std %p next %p", std, std->nexttd);
1986 ohci_dump_td(ohci_softc_t *sc, ohci_soft_td_t *std)
1990 usb_syncmem(&std->dma, std->offs, sizeof(*std->td),
1993 uint32_t flags = O32TOH(std->td->td_flags);
1994 DPRINTF("TD(%#jx) at 0x%08jx:", (uintptr_t)std, std->physaddr, 0, 0);
2003 (u_long)O32TOH(std->td->td_cbp),
2004 (u_long)O32TOH(std->td->td_nexttd),
2005 (u_long)O32TOH(std->td->td_be), 0);
2087 ohci_soft_td_t *std;
2102 std = NULL;
2136 std = ohci_alloc_std(sc);
2137 if (std == NULL)
2140 opipe->tail.td = std;
2141 std->held = &opipe->tail.td;
2142 tdphys = std->physaddr;
2196 if (std != NULL) {
2197 ohci_free_std(sc, std);
2223 ohci_soft_td_t *std;
2224 std = ohci_hash_find_td(sc, O32TOH(sed->ed->ed_headp));
2226 "tl=%#x pipe=%p, std=%p\n", sed,
2229 pipe, std);
2233 if (std)
2234 ohci_dump_td(sc, std);
2387 ohci_soft_td_t *std;
2389 std = ohci_alloc_std(sc);
2390 if (std)
2402 DPRINTFN(10, "new std=%#jx now held at %#jx", (uintptr_t)std,
2404 *(p->held) = std;
2405 std->held = p->held;
2406 std->xfer = xfer;
2765 ohci_soft_td_t *std = ox->ox_stds[i];
2766 if (std == NULL)
2768 ohci_free_std_locked(sc, std);
2854 ohci_soft_td_t *std;
2868 std = ox->ox_stds[0];
2870 std->td->td_flags &= HTOO32(~OHCI_TD_TOGGLE_MASK);
2871 std->td->td_flags |= HTOO32(OHCI_TD_SET_TOGGLE(OHCI_TD_TOGGLE_1));
2872 usb_syncmem(&std->dma,
2873 std->offs + offsetof(ohci_td_t, td_flags),
2874 sizeof(std->td->td_flags),
3047 ohci_soft_td_t *std = ox->ox_stds[i];
3048 if (std == NULL)
3050 if (std != opipe->tail.td)
3051 ohci_free_std_locked(sc, std);
3242 ohci_soft_td_t *std = ox->ox_stds[i];
3243 if (std != NULL)
3245 if (std != opipe->tail.td)
3246 ohci_free_std_locked(sc, std);