Lines Matching refs:xfer

60 	struct fw_xfer *xfer;  in fwmem_xfer_req()  local
62 xfer = fw_xfer_alloc(); in fwmem_xfer_req()
63 if (xfer == NULL) in fwmem_xfer_req()
66 xfer->fc = fwdev->fc; in fwmem_xfer_req()
67 xfer->send.hdr.mode.hdr.dst = FWLOCALBUS | fwdev->dst; in fwmem_xfer_req()
69 xfer->send.spd = fwdev->speed; in fwmem_xfer_req()
71 xfer->send.spd = min_c(spd, fwdev->speed); in fwmem_xfer_req()
72 xfer->hand = (void (*)(fw_xfer*))hand; in fwmem_xfer_req()
73 xfer->sc = sc; in fwmem_xfer_req()
74 xfer->send.pay_len = slen; in fwmem_xfer_req()
75 xfer->recv.pay_len = rlen; in fwmem_xfer_req()
77 return xfer; in fwmem_xfer_req()
90 struct fw_xfer *xfer; in fwmem_read_quad() local
93 xfer = fwmem_xfer_req(fwdev, (char *)sc, spd, 0, 4, (void*)hand); in fwmem_read_quad()
94 if (xfer == NULL) { in fwmem_read_quad()
98 fp = &xfer->send.hdr; in fwmem_read_quad()
103 xfer->send.payload = NULL; in fwmem_read_quad()
104 xfer->recv.payload = (uint32_t *)data; in fwmem_read_quad()
110 if (fw_asyreq(xfer->fc, -1, xfer) == 0) in fwmem_read_quad()
111 return xfer; in fwmem_read_quad()
113 fw_xfer_free(xfer); in fwmem_read_quad()
127 struct fw_xfer *xfer; in fwmem_write_quad() local
130 xfer = fwmem_xfer_req(fwdev, sc, spd, 0, 0, (void*)hand); in fwmem_write_quad()
131 if (xfer == NULL) in fwmem_write_quad()
134 fp = &xfer->send.hdr; in fwmem_write_quad()
140 xfer->send.payload = xfer->recv.payload = NULL; in fwmem_write_quad()
146 if (fw_asyreq(xfer->fc, -1, xfer) == 0) in fwmem_write_quad()
147 return xfer; in fwmem_write_quad()
149 fw_xfer_free(xfer); in fwmem_write_quad()
164 struct fw_xfer *xfer; in fwmem_read_block() local
167 xfer = fwmem_xfer_req(fwdev, sc, spd, 0, roundup2(len, 4), (void*)hand); in fwmem_read_block()
168 if (xfer == NULL) in fwmem_read_block()
171 fp = &xfer->send.hdr; in fwmem_read_block()
178 xfer->send.payload = NULL; in fwmem_read_block()
179 xfer->recv.payload = (uint32_t*)data; in fwmem_read_block()
184 if (fw_asyreq(xfer->fc, -1, xfer) == 0) in fwmem_read_block()
185 return xfer; in fwmem_read_block()
187 fw_xfer_free(xfer); in fwmem_read_block()
202 struct fw_xfer *xfer; in fwmem_write_block() local
205 xfer = fwmem_xfer_req(fwdev, sc, spd, len, 0, (void*)hand); in fwmem_write_block()
206 if (xfer == NULL) in fwmem_write_block()
209 fp = &xfer->send.hdr; in fwmem_write_block()
216 xfer->send.payload = (uint32_t*)data; in fwmem_write_block()
217 xfer->recv.payload = NULL; in fwmem_write_block()
222 if (fw_asyreq(xfer->fc, -1, xfer) == 0) in fwmem_write_block()
223 return xfer; in fwmem_write_block()
225 fw_xfer_free(xfer); in fwmem_write_block()