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