Lines Matching refs:ss
140 void qib_copy_sge(struct rvt_sge_state *ss, void *data, u32 length, int release) in qib_copy_sge() argument
142 struct rvt_sge *sge = &ss->sge; in qib_copy_sge()
149 rvt_update_sge(ss, len, release); in qib_copy_sge()
160 static u32 qib_count_sge(struct rvt_sge_state *ss, u32 length) in qib_count_sge() argument
162 struct rvt_sge *sg_list = ss->sg_list; in qib_count_sge()
163 struct rvt_sge sge = ss->sge; in qib_count_sge()
164 u8 num_sge = ss->num_sge; in qib_count_sge()
206 static void qib_copy_from_sge(void *data, struct rvt_sge_state *ss, u32 length) in qib_copy_from_sge() argument
208 struct rvt_sge *sge = &ss->sge; in qib_copy_from_sge()
223 if (--ss->num_sge) in qib_copy_from_sge()
224 *sge = *ss->sg_list++; in qib_copy_from_sge()
460 static void copy_io(u32 __iomem *piobuf, struct rvt_sge_state *ss, in copy_io() argument
468 u32 len = ss->sge.length; in copy_io()
473 if (len > ss->sge.sge_length) in copy_io()
474 len = ss->sge.sge_length; in copy_io()
477 off = (unsigned long)ss->sge.vaddr & (sizeof(u32) - 1); in copy_io()
479 u32 *addr = (u32 *)((unsigned long)ss->sge.vaddr & in copy_io()
510 u32 *addr = (u32 *) ss->sge.vaddr; in copy_io()
563 qib_pio_copy(piobuf, ss->sge.vaddr, w - 1); in copy_io()
565 last = ((u32 *) ss->sge.vaddr)[w - 1]; in copy_io()
570 qib_pio_copy(piobuf, ss->sge.vaddr, w); in copy_io()
575 u32 v = ((u32 *) ss->sge.vaddr)[w]; in copy_io()
581 rvt_update_sge(ss, len, false); in copy_io()
585 rvt_update_sge(ss, length, false); in copy_io()
809 u32 hdrwords, struct rvt_sge_state *ss, u32 len, in qib_verbs_send_dma() argument
827 ret = qib_sdma_verbs_send(ppd, tx->ss, tx->dwords, tx); in qib_verbs_send_dma()
855 ndesc = qib_count_sge(ss, len); in qib_verbs_send_dma()
870 ret = qib_sdma_verbs_send(ppd, ss, dwords, tx); in qib_verbs_send_dma()
882 qib_copy_from_sge((u32 *) &phdr->hdr + hdrwords, ss, len); in qib_verbs_send_dma()
945 u32 hdrwords, struct rvt_sge_state *ss, u32 len, in qib_verbs_send_pio() argument
999 if (likely(ss->num_sge == 1 && len <= ss->sge.length && in qib_verbs_send_pio()
1000 !((unsigned long)ss->sge.vaddr & (sizeof(u32) - 1)))) { in qib_verbs_send_pio()
1001 u32 *addr = (u32 *) ss->sge.vaddr; in qib_verbs_send_pio()
1004 rvt_update_sge(ss, len, false); in qib_verbs_send_pio()
1016 copy_io(piobuf, ss, len, flush_wc); in qib_verbs_send_pio()
1053 u32 hdrwords, struct rvt_sge_state *ss, u32 len) in qib_verbs_send() argument
1073 ret = qib_verbs_send_pio(qp, hdr, hdrwords, ss, len, in qib_verbs_send()
1076 ret = qib_verbs_send_dma(qp, hdr, hdrwords, ss, len, in qib_verbs_send()