Lines Matching defs:frame

63 static void periodic_unlink(struct ehci_hcd *ehci, unsigned frame, void *ptr)
65 union ehci_shadow *prev_p = &ehci->pshadow[frame];
66 __hc32 *hw_p = &ehci->periodic[frame];
329 * specified frame/uframe. Note that (as summarized in section 11.19
334 * should be executed in "B-frame" terms, which is the same as the
335 * highspeed ssplit's uframe (which is in "H-frame" terms). For example
336 * a ssplit in "H-frame" 0 causes a transfer in "B-frame" 0.
351 unsigned frame,
361 for (frame &= period - 1; frame < EHCI_BANDWIDTH_FRAMES;
362 frame += period) {
366 if (tt->bandwidth[frame] + usecs > 900)
369 uf = frame << 3;
404 * for a periodic transfer starting at the specified frame, using
411 unsigned frame,
422 for (; frame < ehci->periodic_size; frame += period) {
427 here = ehci->pshadow[frame];
428 type = Q_NEXT_TYPE(ehci, ehci->periodic[frame]);
467 "periodic frame %d bogus type %d\n",
468 frame, type);
590 * waiting at least one frame, as described in EHCI 4.12.2.5.
737 unsigned frame,
742 /* complete split running into next frame?
751 for (uframe += frame << 3; uframe < EHCI_BANDWIDTH_SIZE;
763 unsigned frame,
776 if (!check_period(ehci, frame, uframe, qh->ps.bw_uperiod, qh->ps.usecs))
785 if (tt_available(ehci, &qh->ps, tt, frame, uframe)) {
790 if (!check_period(ehci, frame, i,
812 if (tt_no_collision(ehci, qh->ps.bw_period, qh->ps.udev, frame, mask)) {
813 if (!check_period(ehci, frame, uframe + qh->gap_uf + 1,
816 if (!check_period(ehci, frame, uframe + qh->gap_uf,
860 unsigned frame;
863 frame = ++ehci->random_frame & (qh->ps.bw_period - 1);
866 frame, uframe, qh, &c_mask, tt);
888 /* reset S-frame and (maybe) C-frame masks */
1046 /* usbfs wants to report the average usecs per frame tied up
1264 if (itd->frame == ehci->now_frame)
1283 itd->frame = NO_FRAME;
1328 /* NOTE: adjustment needed for frame overflow */
1382 unsigned frame, uf;
1390 /* for IN, don't wrap CSPLIT into the next frame */
1396 frame = uframe >> 3;
1403 if (!tt_available(ehci, &stream->ps, tt, frame, uf))
1410 stream->ps.udev, frame, mask))
1547 next = (now + 2 + 7) & ~0x07; /* full frame cache */
1704 itd_link(struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd)
1706 union ehci_shadow *prev = &ehci->pshadow[frame];
1707 __hc32 *hw_p = &ehci->periodic[frame];
1724 itd->frame = frame;
1738 unsigned next_uframe, uframe, frame;
1773 frame = next_uframe >> 3;
1782 if (((next_uframe >> 3) != frame)
1784 itd_link(ehci, frame & (ehci->periodic_size - 1), itd);
1806 * assuming (a) no more than two urbs per frame on this endpoint, and also
1985 /* figure out per-frame sitd fields that we'll need later
2056 if (sitd->frame == ehci->now_frame)
2075 sitd->frame = NO_FRAME;
2119 sitd_link(struct ehci_hcd *ehci, unsigned frame, struct ehci_sitd *sitd)
2122 sitd->sitd_next = ehci->pshadow[frame];
2123 sitd->hw_next = ehci->periodic[frame];
2124 ehci->pshadow[frame].sitd = sitd;
2125 sitd->frame = frame;
2127 ehci->periodic[frame] = cpu_to_hc32(ehci, sitd->sitd_dma | Q_TYPE_SITD);
2157 /* fill sITDs frame by frame */
2165 /* ASSERT: no itds for this endpoint in this frame */
2200 * assuming (a) no more than two urbs per frame on this endpoint, and also
2345 unsigned uf, now_frame, frame;
2366 frame = ehci->last_iso_frame;
2369 /* Scan each element in frame's queue for completions */
2370 q_p = &ehci->pshadow[frame];
2371 hw_p = &ehci->periodic[frame];
2383 * frame is current.
2385 if (frame == now_frame && live) {
2424 * frame is current.
2426 if (((frame == now_frame) ||
2427 (((frame + 1) & fmask) == now_frame))
2455 ehci_dbg(ehci, "corrupt type %d frame %d shadow %p\n",
2456 type, frame, q.ptr);
2471 /* Stop when we have reached the current frame */
2472 if (frame == now_frame)
2475 /* The last frame may still have active siTDs */
2476 ehci->last_iso_frame = frame;
2477 frame = (frame + 1) & fmask;