Lines Matching refs:enqueue

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
27 * 3. A ring is full if enqueue++ (for the definition of increment above)
33 * 2. When a producer increments an enqueue pointer and encounters a toggle bit
37 * 1. Check if ring is full before you enqueue.
39 * Update enqueue pointer between each write (which may update the ring
146 * effect the ring dequeue or enqueue pointers.
217 * @more_trbs_coming: Will you enqueue more TRBs before calling
227 chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
229 if (last_trb_on_seg(ring->enq_seg, ring->enqueue)) {
230 xhci_err(xhci, "Tried to move enqueue past ring segment\n");
234 next = ++(ring->enqueue);
243 * prepare_ring() just before we enqueue the TD at the top of
268 ring->enqueue = ring->enq_seg->trbs;
269 next = ring->enqueue;
281 * Return number of free normal TRBs from enqueue to dequeue pointer on ring.
289 union xhci_trb *enq = ring->enqueue;
317 * Check to see if there's room to enqueue num_trbs on the ring and make sure
318 * enqueue pointer will not advance into dequeue segment. See rules above.
330 enq_used = ring->enqueue - ring->enq_seg->trbs;
332 /* how many trbs will be queued past the enqueue segment? */
344 /* Empty ring special case, enqueue stuck on link trb while dequeue advanced */
345 if (trb_is_link(ring->enqueue) && ring->enq_seg->next->trbs == ring->dequeue)
425 if ((xhci->cmd_ring->dequeue != xhci->cmd_ring->enqueue) &&
662 * can move the dequeue pointer to the current enqueue position.
669 new_deq = ep_ring->enqueue;
671 xhci_dbg(xhci, "ep ring empty, Set new dequeue = enqueue");
765 * (The last TRB actually points to the ring enqueue pointer, which is not part
1725 /* If CMD ring stopped we own the trbs between enqueue and dequeue */
3191 * @more_trbs_coming: Will you enqueue more TRBs before calling
3200 trb = &ring->enqueue->generic;
3268 while (trb_is_link(ep_ring->enqueue)) {
3275 ep_ring->enqueue->link.control &=
3278 ep_ring->enqueue->link.control |=
3282 ep_ring->enqueue->link.control ^= cpu_to_le32(TRB_CYCLE);
3285 if (link_trb_toggles_cycle(ep_ring->enqueue))
3289 ep_ring->enqueue = ep_ring->enq_seg->trbs;
3298 if (last_trb_on_seg(ep_ring->enq_seg, ep_ring->enqueue)) {
3350 td->first_trb = ep_ring->enqueue;
3645 * state may change as we enqueue the other TRBs, so save it too.
3647 start_trb = &ring->enqueue->generic;
3676 if (trb_is_link(ring->enqueue + 1)) {
3690 td->last_trb = ring->enqueue;
3740 urb_priv->td[1].last_trb = ring->enqueue;
3800 * state may change as we enqueue the other TRBs, so save it too.
3802 start_trb = &ep_ring->enqueue->generic;
3867 td->last_trb = ep_ring->enqueue;
4081 start_trb = &ep_ring->enqueue->generic;
4158 td->last_trb = ep_ring->enqueue;
4227 urb_priv->td[0].last_trb = ep_ring->enqueue;
4231 /* Reset the ring enqueue back to the first TRB and its cycle bit. */
4232 ep_ring->enqueue = urb_priv->td[0].first_trb;
4356 cmd->command_trb = xhci->cmd_ring->enqueue;