Lines Matching refs:ofs
61 static u8 *next_unit(struct pt3_adapter *adap, int *idx, int *ofs) in next_unit() argument
63 *ofs += PT3_ACCESS_UNIT; in next_unit()
64 if (*ofs >= DATA_BUF_SZ) { in next_unit()
65 *ofs -= DATA_BUF_SZ; in next_unit()
70 return &adap->buffer[*idx].data[*ofs]; in next_unit()
75 int idx, ofs; in pt3_proc_dma() local
78 ofs = adap->buf_ofs; 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()
100 adap->buf_ofs = ofs; in pt3_proc_dma()
107 int idx, ofs; in pt3_init_dmabuf() local
111 ofs = 0; in pt3_init_dmabuf()
115 p[ofs] = PT3_BUF_CANARY; in pt3_init_dmabuf()
116 ofs += PT3_ACCESS_UNIT; in pt3_init_dmabuf()
117 if (ofs >= DATA_BUF_SZ) { in pt3_init_dmabuf()
118 ofs -= DATA_BUF_SZ; in pt3_init_dmabuf()
150 int idx, ofs; in pt3_alloc_dmabuf() local
170 ofs = 0; in pt3_alloc_dmabuf()
188 data_addr = adap->buffer[idx].b_addr + ofs; in pt3_alloc_dmabuf()
198 ofs += DATA_XFER_SZ; in pt3_alloc_dmabuf()
199 if (ofs >= DATA_BUF_SZ) { in pt3_alloc_dmabuf()
200 ofs -= DATA_BUF_SZ; in pt3_alloc_dmabuf()