Lines Matching refs:qhead
170 dmap->qlen = dmap->qhead = dmap->qtail = dmap->user_counter = 0;
375 dmap->qlen = dmap->qhead = dmap->qtail = dmap->user_counter = 0;
392 dmap->qlen = dmap->qhead = dmap->qtail = dmap->user_counter = 0;
415 if (dmap->counts[dmap->qhead] == 0)
416 dmap->counts[dmap->qhead] = dmap->fragment_size;
418 adev->d->output_block(dev, dmap->raw_buf_phys + dmap->qhead * dmap->fragment_size,
419 dmap->counts[dmap->qhead], 1);
603 *buf = &dmap->raw_buf[dmap->qhead * dmap->fragment_size + dmap->counts[dmap->qhead]];
604 *len = dmap->fragment_size - dmap->counts[dmap->qhead];
606 return dmap->qhead;
613 int p = dmap->counts[dmap->qhead] + c;
623 dmap->counts[dmap->qhead] = 0;
625 dmap->qhead = (dmap->qhead + 1) % dmap->nbufs;
627 else dmap->counts[dmap->qhead] = p;
659 if (dmap->qhead == 0)
795 active_offs = dmap->byte_counter + dmap->qhead * dmap->fragment_size;
971 dmap->qhead = (dmap->qhead + 1) % dmap->nbufs;
972 if (dmap->qhead == 0) { /* Wrapped */
984 dmap->counts[dmap->qhead] = dmap->fragment_size;
991 this_fragment = dmap->qhead;
992 dmap->qhead = (dmap->qhead + 1) % dmap->nbufs;
994 if (dmap->qhead == 0) { /* Wrapped */
1048 pos = pos / dmap->fragment_size; /* Actual qhead */
1052 while (dmap->qhead != pos && n++ < dmap->nbufs)
1099 dmap->qhead = (dmap->qhead + 1) % dmap->nbufs;
1149 pos = pos / dmap->fragment_size; /* Actual qhead */