Lines Matching refs:idx
16 static u32 get_dma_base(int idx) in get_dma_base() argument
20 i = (idx == 1 || idx == 2) ? 3 - idx : idx; in get_dma_base()
61 static u8 *next_unit(struct pt3_adapter *adap, int *idx, int *ofs) in next_unit() argument
66 (*idx)++; in next_unit()
67 if (*idx == adap->num_bufs) in next_unit()
68 *idx = 0; in next_unit()
70 return &adap->buffer[*idx].data[*ofs]; in next_unit()
75 int idx, ofs; in pt3_proc_dma() local
77 idx = adap->buf_idx; in pt3_proc_dma()
80 if (adap->buffer[idx].data[ofs] == PT3_BUF_CANARY) in pt3_proc_dma()
83 while (*next_unit(adap, &idx, &ofs) != PT3_BUF_CANARY) { in pt3_proc_dma()
93 adap->buffer[idx].data, ofs / TS_PACKET_SZ); in pt3_proc_dma()
99 adap->buf_idx = idx; in pt3_proc_dma()
107 int idx, ofs; in pt3_init_dmabuf() local
110 idx = 0; in pt3_init_dmabuf()
114 while (idx < adap->num_bufs) { in pt3_init_dmabuf()
119 idx++; in pt3_init_dmabuf()
120 p = adap->buffer[idx].data; in pt3_init_dmabuf()
150 int idx, ofs; in pt3_alloc_dmabuf() local
169 idx = 0; in pt3_alloc_dmabuf()
188 data_addr = adap->buffer[idx].b_addr + ofs; in pt3_alloc_dmabuf()
201 idx++; in pt3_alloc_dmabuf()
202 if (idx >= adap->num_bufs) { in pt3_alloc_dmabuf()