Lines Matching refs:ofs
70 static u8 *next_unit(struct pt3_adapter *adap, int *idx, int *ofs) in next_unit() argument
72 *ofs += PT3_ACCESS_UNIT; in next_unit()
73 if (*ofs >= DATA_BUF_SZ) { in next_unit()
74 *ofs -= DATA_BUF_SZ; in next_unit()
79 return &adap->buffer[*idx].data[*ofs]; in next_unit()
84 int idx, ofs; in pt3_proc_dma() local
87 ofs = adap->buf_ofs; 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()
109 adap->buf_ofs = ofs; in pt3_proc_dma()
116 int idx, ofs; in pt3_init_dmabuf() local
120 ofs = 0; in pt3_init_dmabuf()
124 p[ofs] = PT3_BUF_CANARY; in pt3_init_dmabuf()
125 ofs += PT3_ACCESS_UNIT; in pt3_init_dmabuf()
126 if (ofs >= DATA_BUF_SZ) { in pt3_init_dmabuf()
127 ofs -= DATA_BUF_SZ; in pt3_init_dmabuf()
159 int idx, ofs; in pt3_alloc_dmabuf() local
179 ofs = 0; in pt3_alloc_dmabuf()
197 data_addr = adap->buffer[idx].b_addr + ofs; in pt3_alloc_dmabuf()
207 ofs += DATA_XFER_SZ; in pt3_alloc_dmabuf()
208 if (ofs >= DATA_BUF_SZ) { in pt3_alloc_dmabuf()
209 ofs -= DATA_BUF_SZ; in pt3_alloc_dmabuf()