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
140 * effect the ring dequeue or enqueue pointers.
164 if (!last_trb_on_seg(ring->deq_seg, ring->dequeue)) {
165 ring->dequeue++;
168 if (last_trb_on_ring(ring, ring->deq_seg, ring->dequeue))
171 ring->dequeue = ring->deq_seg->trbs;
176 if (!trb_is_link(ring->dequeue)) {
177 if (last_trb_on_seg(ring->deq_seg, ring->dequeue))
180 ring->dequeue++;
183 while (trb_is_link(ring->dequeue)) {
185 ring->dequeue = ring->deq_seg->trbs;
230 /* Update the dequeue pointer further if that was a link TRB */
275 * Return number of free normal TRBs from enqueue to dequeue pointer on ring.
295 if (enq == ring->dequeue)
299 if (ring->deq_seg == enq_seg && ring->dequeue >= enq)
300 return free + (ring->dequeue - enq);
312 * enqueue pointer will not advance into dequeue segment. See rules above.
332 /* Empty ring special case, enqueue stuck on link trb while dequeue advanced */
333 if (trb_is_link(ring->enqueue) && ring->enq_seg->next->trbs == ring->dequeue)
412 if ((xhci->cmd_ring->dequeue != xhci->cmd_ring->enqueue) &&
424 union xhci_trb *new_deq = xhci->cmd_ring->dequeue;
491 * We don't want to restart any stream rings if there's a set dequeue
598 * Get the hw dequeue pointer xHC stopped on, either directly from the
641 xhci_warn(xhci, "WARN can't find new dequeue, invalid stream ID %u\n",
648 * can move the dequeue pointer to the current enqueue position.
657 xhci_dbg(xhci, "ep ring empty, Set new dequeue = enqueue");
660 xhci_warn(xhci, "Can't find new dequeue state, missing td\n");
667 new_deq = ep_ring->dequeue;
693 if (new_deq == ep->ring->dequeue) {
694 xhci_err(xhci, "Error: Failed finding new dequeue state\n");
705 xhci_warn(xhci, "Can't find dma of new dequeue ptr\n");
741 * this command completes. The HC won't set the dequeue pointer
1007 * move the xHC endpoint ring dequeue pointer past this TD.
1039 /* If there's no need to move the dequeue pointer then we're done */
1085 * cancelled, then we must move the ring's dequeue pointer past the last TRB
1122 * with a proper error code, and the ring dequeue moved past the TD.
1283 dequeue_temp = ep_ring->dequeue;
1286 * ends just before a link TRB, the dequeue pointer will be left on
1288 * the dequeue pointer one segment further, or we'll jump off
1291 if (trb_is_link(ep_ring->dequeue)) {
1293 ep_ring->dequeue = ep_ring->deq_seg->trbs;
1296 while (ep_ring->dequeue != dev->eps[ep_index].queued_deq_ptr) {
1298 ep_ring->dequeue++;
1299 if (trb_is_link(ep_ring->dequeue)) {
1300 if (ep_ring->dequeue ==
1304 ep_ring->dequeue = ep_ring->deq_seg->trbs;
1306 if (ep_ring->dequeue == dequeue_temp) {
1307 xhci_dbg(xhci, "Unable to find new dequeue pointer\n");
1396 /* Update the ring's dequeue segment and dequeue pointer
1680 cmd_trb = xhci->cmd_ring->dequeue;
1702 /* If CMD ring stopped we own the trbs between enqueue and dequeue */
1708 if (cmd->command_trb != xhci->cmd_ring->dequeue) {
2010 /* Update event ring dequeue pointer before dropping the lock */
2175 * the ring dequeue pointer or take this TD off any lists yet.
2195 * the TD and dequeue pointer will be handled by reset
2217 * command, followed by a set dequeue command to move past the
2233 /* Update ring dequeue pointer */
2234 ep_ring->dequeue = td->last_trb;
2241 /* sum trb lengths from ring dequeue up to stop_trb, _excluding_ stop_trb */
2246 union xhci_trb *trb = ring->dequeue;
2473 /* Update ring dequeue pointer */
2474 ep->ring->dequeue = td->last_trb;
2814 ep_seg = trb_in_td(xhci, ep_ring->deq_seg, ep_ring->dequeue,
2819 * is not in the current TD pointed by ep_ring->dequeue because
2820 * that the hardware dequeue pointer still at the previous TRB
2867 ep_ring->dequeue = td->last_trb;
2883 ep_ring->dequeue, td->last_trb,
2938 * Do not update event ring dequeue pointer if we're in a loop
2958 ir->event_ring->dequeue),
2980 if (!ir || !ir->event_ring || !ir->event_ring->dequeue) {
2985 event = ir->event_ring->dequeue;
3033 /* Update SW event ring dequeue pointer */
3057 if (event_ring_deq != ir->event_ring->dequeue) {
3059 ir->event_ring->dequeue);
3061 xhci_warn(xhci, "WARN something wrong with SW event ring dequeue ptr\n");
3070 /* Update HC event ring dequeue pointer */
3151 event_ring_deq = ir->event_ring->dequeue;
3159 event_ring_deq = ir->event_ring->dequeue;