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