Lines Matching refs:dequeue
16 * 3. Enqueue pointer = dequeue pointer = address of first TRB in the segment.
19 * 1. A ring is empty if enqueue == dequeue. This means there will always be at
22 * 2. When incrementing an enqueue or dequeue pointer, if the next TRB is a
28 * equals the dequeue pointer.
31 * 1. When a consumer increments a dequeue pointer and encounters a toggle bit
48 * 2. Update dequeue pointer (which may update the ring cycle state) and
51 * updates event ring dequeue pointer. HC is the consumer for the command and
137 * effect the ring dequeue or enqueue pointers.
160 if (!last_trb_on_seg(ring->deq_seg, ring->dequeue)) {
161 ring->dequeue++;
164 if (last_trb_on_ring(ring, ring->deq_seg, ring->dequeue))
167 ring->dequeue = ring->deq_seg->trbs;
172 if (!trb_is_link(ring->dequeue)) {
173 ring->dequeue++;
176 while (trb_is_link(ring->dequeue)) {
178 ring->dequeue = ring->deq_seg->trbs;
216 /* Update the dequeue pointer further if that was a link TRB */
257 * enqueue pointer will not advance into dequeue segment. See rules above.
268 num_trbs_in_deq_seg = ring->dequeue - ring->deq_seg->trbs;
334 if ((xhci->cmd_ring->dequeue != xhci->cmd_ring->enqueue) &&
346 union xhci_trb *new_deq = xhci->cmd_ring->dequeue;
413 * We don't want to restart any stream rings if there's a set dequeue
523 * Get the hw dequeue pointer xHC stopped on, either directly from the
546 * Move the xHC's endpoint ring dequeue pointer past cur_td.
547 * Record the new state of the xHC's endpoint ring dequeue segment,
548 * dequeue pointer, stream id, and new consumer cycle state in state.
549 * Update our internal representation of the ring's dequeue pointer.
556 * - Finally we move the dequeue state one TRB further, toggling the cycle bit
584 xhci_warn(xhci, "WARN can't find new dequeue state "
592 * can move the dequeue pointer to the current enqueue position.
601 xhci_warn(xhci, "Can't find new dequeue state, missing cur_td\n");
612 new_deq = ep_ring->dequeue;
615 * Quirk: xHC write-back of the DCS field in the hardware dequeue
617 * the dequeue pointer.
660 if (new_deq == ep->ring->dequeue) {
661 xhci_err(xhci, "Error: Failed finding new dequeue state\n");
678 "New dequeue segment = %p (virtual)",
682 "New dequeue pointer = 0x%llx (DMA)",
903 * move the xHC endpoint ring dequeue pointer past this TD.
928 * cancelled, then we must move the ring's dequeue pointer past the last TRB
1183 dequeue_temp = ep_ring->dequeue;
1186 * ends just before a link TRB, the dequeue pointer will be left on
1188 * the dequeue pointer one segment further, or we'll jump off
1191 if (trb_is_link(ep_ring->dequeue)) {
1193 ep_ring->dequeue = ep_ring->deq_seg->trbs;
1196 while (ep_ring->dequeue != dev->eps[ep_index].queued_deq_ptr) {
1199 ep_ring->dequeue++;
1200 if (trb_is_link(ep_ring->dequeue)) {
1201 if (ep_ring->dequeue ==
1205 ep_ring->dequeue = ep_ring->deq_seg->trbs;
1207 if (ep_ring->dequeue == dequeue_temp) {
1214 xhci_dbg(xhci, "Unable to find new dequeue pointer\n");
1303 /* Update the ring's dequeue segment and dequeue pointer
1581 cmd_trb = xhci->cmd_ring->dequeue;
1603 /* If CMD ring stopped we own the trbs between enqueue and dequeue */
1609 if (cmd->command_trb != xhci->cmd_ring->dequeue) {
1913 /* Update event ring dequeue pointer before dropping the lock */
2075 * the ring dequeue pointer or take this TD off any lists yet.
2086 * command, followed by a set dequeue command to move past the
2098 /* Update ring dequeue pointer */
2099 ep_ring->dequeue = td->last_trb;
2108 /* sum trb lengths from ring dequeue up to stop_trb, _excluding_ stop_trb */
2113 union xhci_trb *trb = ring->dequeue;
2340 /* Update ring dequeue pointer */
2341 ep->ring->dequeue = td->last_trb;
2690 ep_seg = trb_in_td(xhci, ep_ring->deq_seg, ep_ring->dequeue,
2695 * is not in the current TD pointed by ep_ring->dequeue because
2696 * that the hardware dequeue pointer still at the previous TRB
2743 ep_ring->dequeue = td->last_trb;
2759 ep_ring->dequeue, td->last_trb,
2815 * Do not update event ring dequeue pointer if we're in a loop
2835 xhci->event_ring->dequeue),
2856 if (!xhci->event_ring || !xhci->event_ring->dequeue) {
2861 event = xhci->event_ring->dequeue;
2910 /* Update SW event ring dequeue pointer */
2932 if (event_ring_deq != xhci->event_ring->dequeue) {
2934 xhci->event_ring->dequeue);
2936 xhci_warn(xhci, "WARN something wrong with SW event ring dequeue ptr\n");
2945 /* Update HC event ring dequeue pointer */
3018 event_ring_deq = xhci->event_ring->dequeue;
3026 event_ring_deq = xhci->event_ring->dequeue;
4346 * this command completes. The HC won't set the dequeue pointer