Lines Matching refs:idx
25 static u32 get_dma_base(int idx) in get_dma_base() argument
29 i = (idx == 1 || idx == 2) ? 3 - idx : idx; in get_dma_base()
70 static u8 *next_unit(struct pt3_adapter *adap, int *idx, int *ofs) in next_unit() argument
75 (*idx)++; in next_unit()
76 if (*idx == adap->num_bufs) in next_unit()
77 *idx = 0; in next_unit()
79 return &adap->buffer[*idx].data[*ofs]; in next_unit()
84 int idx, ofs; in pt3_proc_dma() local
86 idx = adap->buf_idx; in pt3_proc_dma()
89 if (adap->buffer[idx].data[ofs] == PT3_BUF_CANARY) in pt3_proc_dma()
92 while (*next_unit(adap, &idx, &ofs) != PT3_BUF_CANARY) { in pt3_proc_dma()
102 adap->buffer[idx].data, ofs / TS_PACKET_SZ); in pt3_proc_dma()
108 adap->buf_idx = idx; in pt3_proc_dma()
116 int idx, ofs; in pt3_init_dmabuf() local
119 idx = 0; in pt3_init_dmabuf()
123 while (idx < adap->num_bufs) { in pt3_init_dmabuf()
128 idx++; in pt3_init_dmabuf()
129 p = adap->buffer[idx].data; in pt3_init_dmabuf()
159 int idx, ofs; in pt3_alloc_dmabuf() local
178 idx = 0; in pt3_alloc_dmabuf()
197 data_addr = adap->buffer[idx].b_addr + ofs; in pt3_alloc_dmabuf()
210 idx++; in pt3_alloc_dmabuf()
211 if (idx >= adap->num_bufs) { in pt3_alloc_dmabuf()