Lines Matching refs:xfer
78 struct uhc_transfer *const xfer) in vrt_xfer_control() argument
81 struct net_buf *buf = xfer->buf; in vrt_xfer_control()
86 if (xfer->stage == UHC_CONTROL_STAGE_SETUP) { in vrt_xfer_control()
89 xfer->addr, USB_CONTROL_EP_OUT, in vrt_xfer_control()
90 xfer->setup_pkt, sizeof(xfer->setup_pkt)); in vrt_xfer_control()
102 if (buf != NULL && xfer->stage == UHC_CONTROL_STAGE_DATA) { in vrt_xfer_control()
103 if (USB_EP_DIR_IS_IN(xfer->ep)) { in vrt_xfer_control()
104 length = MIN(net_buf_tailroom(buf), xfer->mps); in vrt_xfer_control()
107 length = MIN(buf->len, xfer->mps); in vrt_xfer_control()
113 xfer->addr, xfer->ep, in vrt_xfer_control()
126 if (xfer->stage == UHC_CONTROL_STAGE_STATUS) { in vrt_xfer_control()
130 if (USB_EP_DIR_IS_IN(xfer->ep)) { in vrt_xfer_control()
137 xfer->addr, ep, in vrt_xfer_control()
154 struct uhc_transfer *const xfer) in vrt_xfer_bulk() argument
157 struct net_buf *buf = xfer->buf; in vrt_xfer_bulk()
162 if (USB_EP_DIR_IS_IN(xfer->ep)) { in vrt_xfer_bulk()
163 length = MIN(net_buf_tailroom(buf), xfer->mps); in vrt_xfer_bulk()
166 length = MIN(buf->len, xfer->mps); in vrt_xfer_bulk()
170 uvb_pkt = uvb_alloc_pkt(UVB_REQUEST_DATA, xfer->addr, xfer->ep, in vrt_xfer_bulk()
206 struct uhc_transfer *const xfer = priv->last_xfer; in vrt_hrslt_success() local
207 struct net_buf *buf = xfer->buf; in vrt_hrslt_success()
213 if (xfer->buf != NULL) { in vrt_hrslt_success()
214 xfer->stage = UHC_CONTROL_STAGE_DATA; in vrt_hrslt_success()
216 xfer->stage = UHC_CONTROL_STAGE_STATUS; in vrt_hrslt_success()
221 if (xfer->stage == UHC_CONTROL_STAGE_STATUS) { in vrt_hrslt_success()
228 length = MIN(buf->len, xfer->mps); in vrt_hrslt_success()
233 xfer->stage = UHC_CONTROL_STAGE_STATUS; in vrt_hrslt_success()
241 if (pkt->length > xfer->mps) { in vrt_hrslt_success()
247 if (pkt->length < xfer->mps || !net_buf_tailroom(buf)) { in vrt_hrslt_success()
249 xfer->stage = UHC_CONTROL_STAGE_STATUS; in vrt_hrslt_success()
260 uhc_xfer_return(dev, xfer, 0); in vrt_hrslt_success()
279 struct uhc_transfer *const xfer = priv->last_xfer; in vrt_handle_reply() local
282 if (xfer == NULL) { in vrt_handle_reply()
443 struct uhc_transfer *const xfer) in uhc_vrt_enqueue() argument
445 uhc_xfer_append(dev, xfer); in uhc_vrt_enqueue()
452 struct uhc_transfer *const xfer) in uhc_vrt_dequeue() argument