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];
335 * specified frame/uframe. Note that (as summarized in section 11.19
340 * should be executed in "B-frame" terms, which is the same as the
341 * highspeed ssplit's uframe (which is in "H-frame" terms). For example
342 * a ssplit in "H-frame" 0 causes a transfer in "B-frame" 0.
357 unsigned frame,
367 for (frame &= period - 1; frame < EHCI_BANDWIDTH_FRAMES;
368 frame += period) {
372 if (tt->bandwidth[frame] + usecs > 900)
375 uf = frame << 3;
410 * for a periodic transfer starting at the specified frame, using
417 unsigned frame,
428 for (; frame < ehci->periodic_size; frame += period) {
433 here = ehci->pshadow[frame];
434 type = Q_NEXT_TYPE(ehci, ehci->periodic[frame]);
473 "periodic frame %d bogus type %d\n",
474 frame, type);
597 * waiting at least one frame, as described in EHCI 4.12.2.5.
744 unsigned frame,
749 /* complete split running into next frame?
758 for (uframe += frame << 3; uframe < EHCI_BANDWIDTH_SIZE;
770 unsigned frame,
783 if (!check_period(ehci, frame, uframe, qh->ps.bw_uperiod, qh->ps.usecs))
792 if (tt_available(ehci, &qh->ps, tt, frame, uframe)) {
797 if (!check_period(ehci, frame, i,
819 if (tt_no_collision(ehci, qh->ps.bw_period, qh->ps.udev, frame, mask)) {
820 if (!check_period(ehci, frame, uframe + qh->gap_uf + 1,
823 if (!check_period(ehci, frame, uframe + qh->gap_uf,
867 unsigned frame;
870 frame = ++ehci->random_frame & (qh->ps.bw_period - 1);
873 frame, uframe, qh, &c_mask, tt);
895 /* reset S-frame and (maybe) C-frame masks */
1053 /* usbfs wants to report the average usecs per frame tied up
1269 if (itd->frame == ehci->now_frame)
1288 itd->frame = NO_FRAME;
1333 /* NOTE: adjustment needed for frame overflow */
1393 unsigned frame, uf;
1401 /* for IN, don't wrap CSPLIT into the next frame */
1407 frame = uframe >> 3;
1414 if (!tt_available(ehci, &stream->ps, tt, frame, uf))
1421 stream->ps.udev, frame, mask))
1558 next = (now + 2 + 7) & ~0x07; /* full frame cache */
1715 itd_link(struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd)
1717 union ehci_shadow *prev = &ehci->pshadow[frame];
1718 __hc32 *hw_p = &ehci->periodic[frame];
1735 itd->frame = frame;
1749 unsigned next_uframe, uframe, frame;
1784 frame = next_uframe >> 3;
1793 if (((next_uframe >> 3) != frame)
1795 itd_link(ehci, frame & (ehci->periodic_size - 1), itd);
1817 * assuming (a) no more than two urbs per frame on this endpoint, and also
1996 /* figure out per-frame sitd fields that we'll need later
2067 if (sitd->frame == ehci->now_frame)
2086 sitd->frame = NO_FRAME;
2130 sitd_link(struct ehci_hcd *ehci, unsigned frame, struct ehci_sitd *sitd)
2133 sitd->sitd_next = ehci->pshadow[frame];
2134 sitd->hw_next = ehci->periodic[frame];
2135 ehci->pshadow[frame].sitd = sitd;
2136 sitd->frame = frame;
2138 ehci->periodic[frame] = cpu_to_hc32(ehci, sitd->sitd_dma | Q_TYPE_SITD);
2168 /* fill sITDs frame by frame */
2176 /* ASSERT: no itds for this endpoint in this frame */
2211 * assuming (a) no more than two urbs per frame on this endpoint, and also
2356 unsigned uf, now_frame, frame;
2377 frame = ehci->last_iso_frame;
2380 /* Scan each element in frame's queue for completions */
2381 q_p = &ehci->pshadow[frame];
2382 hw_p = &ehci->periodic[frame];
2394 * frame is current.
2396 if (frame == now_frame && live) {
2435 * frame is current.
2437 if (((frame == now_frame) ||
2438 (((frame + 1) & fmask) == now_frame))
2466 ehci_dbg(ehci, "corrupt type %d frame %d shadow %p\n",
2467 type, frame, q.ptr);
2482 /* Stop when we have reached the current frame */
2483 if (frame == now_frame)
2486 /* The last frame may still have active siTDs */
2487 ehci->last_iso_frame = frame;
2488 frame = (frame + 1) & fmask;