Lines Matching refs:ss

171 void ipath_copy_sge(struct ipath_sge_state *ss, void *data, u32 length)  in ipath_copy_sge()  argument
173 struct ipath_sge *sge = &ss->sge; in ipath_copy_sge()
188 if (--ss->num_sge) in ipath_copy_sge()
189 *sge = *ss->sg_list++; in ipath_copy_sge()
211 void ipath_skip_sge(struct ipath_sge_state *ss, u32 length) in ipath_skip_sge() argument
213 struct ipath_sge *sge = &ss->sge; in ipath_skip_sge()
227 if (--ss->num_sge) in ipath_skip_sge()
228 *sge = *ss->sg_list++; in ipath_skip_sge()
249 static u32 ipath_count_sge(struct ipath_sge_state *ss, u32 length) in ipath_count_sge() argument
251 struct ipath_sge *sg_list = ss->sg_list; in ipath_count_sge()
252 struct ipath_sge sge = ss->sge; in ipath_count_sge()
253 u8 num_sge = ss->num_sge; in ipath_count_sge()
295 static void ipath_copy_from_sge(void *data, struct ipath_sge_state *ss, in ipath_copy_from_sge() argument
298 struct ipath_sge *sge = &ss->sge; in ipath_copy_from_sge()
313 if (--ss->num_sge) in ipath_copy_from_sge()
314 *sge = *ss->sg_list++; in ipath_copy_from_sge()
780 static void update_sge(struct ipath_sge_state *ss, u32 length) in update_sge() argument
782 struct ipath_sge *sge = &ss->sge; in update_sge()
788 if (--ss->num_sge) in update_sge()
789 *sge = *ss->sg_list++; in update_sge()
837 static void copy_io(u32 __iomem *piobuf, struct ipath_sge_state *ss, in copy_io() argument
845 u32 len = ss->sge.length; in copy_io()
850 if (len > ss->sge.sge_length) in copy_io()
851 len = ss->sge.sge_length; in copy_io()
854 off = (unsigned long)ss->sge.vaddr & (sizeof(u32) - 1); in copy_io()
856 u32 *addr = (u32 *)((unsigned long)ss->sge.vaddr & in copy_io()
887 u32 *addr = (u32 *) ss->sge.vaddr; in copy_io()
941 __iowrite32_copy(piobuf, ss->sge.vaddr, w - 1); in copy_io()
943 last = ((u32 *) ss->sge.vaddr)[w - 1]; in copy_io()
948 __iowrite32_copy(piobuf, ss->sge.vaddr, w); in copy_io()
953 u32 v = ((u32 *) ss->sge.vaddr)[w]; in copy_io()
959 update_sge(ss, len); in copy_io()
963 update_sge(ss, length); in copy_io()
1099 struct ipath_sge_state *ss, u32 len, in ipath_verbs_send_dma() argument
1115 ret = ipath_sdma_verbs_send(dd, tx->ss, tx->len, tx); in ipath_verbs_send_dma()
1158 ndesc = ipath_count_sge(ss, len); in ipath_verbs_send_dma()
1171 ret = ipath_sdma_verbs_send(dd, ss, dwords, tx); in ipath_verbs_send_dma()
1174 tx->ss = ss; in ipath_verbs_send_dma()
1196 ipath_copy_from_sge(piobuf + hdrwords, ss, len); in ipath_verbs_send_dma()
1206 tx->ss = NULL; in ipath_verbs_send_dma()
1224 struct ipath_sge_state *ss, u32 len, in ipath_verbs_send_pio() argument
1285 if (likely(ss->num_sge == 1 && len <= ss->sge.length && in ipath_verbs_send_pio()
1286 !((unsigned long)ss->sge.vaddr & (sizeof(u32) - 1)))) { in ipath_verbs_send_pio()
1287 u32 *addr = (u32 *) ss->sge.vaddr; in ipath_verbs_send_pio()
1290 update_sge(ss, len); in ipath_verbs_send_pio()
1302 copy_io(piobuf, ss, len, flush_wc); in ipath_verbs_send_pio()
1323 u32 hdrwords, struct ipath_sge_state *ss, u32 len) in ipath_verbs_send() argument
1343 ret = ipath_verbs_send_pio(qp, hdr, hdrwords, ss, len, in ipath_verbs_send()
1346 ret = ipath_verbs_send_dma(qp, hdr, hdrwords, ss, len, in ipath_verbs_send()