Lines Matching refs:tail
206 int hw_idx, sw_idx, i, head, tail;
219 sw_idx = tail = jrp->tail;
222 for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) {
223 sw_idx = (tail + i) & (JOBR_DEPTH - 1);
230 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
264 * the tail. Otherwise, increment tail by 1 plus the
267 if (sw_idx == tail) {
269 tail = (tail + 1) & (JOBR_DEPTH - 1);
270 } while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 &&
271 jrp->entinfo[tail].desc_addr_dma == 0);
273 jrp->tail = tail;
372 int head, tail, desc_size;
385 tail = READ_ONCE(jrp->tail);
388 CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) {
470 jrp->tail = 0;