Lines Matching refs:hs_req

379 				struct dwc2_hsotg_req *hs_req)  in dwc2_hsotg_unmap_dma()  argument
381 struct usb_request *req = &hs_req->req; in dwc2_hsotg_unmap_dma()
452 struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_write_fifo() argument
456 int buf_pos = hs_req->req.actual; in dwc2_hsotg_write_fifo()
588 to_write, hs_req->req.length, can_write, buf_pos); in dwc2_hsotg_write_fifo()
593 hs_req->req.actual = buf_pos + to_write; in dwc2_hsotg_write_fifo()
600 data = hs_req->req.buf + buf_pos; in dwc2_hsotg_write_fifo()
883 struct dwc2_hsotg_req *hs_req, *treq; in dwc2_gadget_start_isoc_ddma() local
907 list_for_each_entry_safe(hs_req, treq, &hs_ep->queue, queue) { in dwc2_gadget_start_isoc_ddma()
908 ret = dwc2_gadget_fill_isoc_desc(hs_ep, hs_req->req.dma, in dwc2_gadget_start_isoc_ddma()
909 hs_req->req.length); in dwc2_gadget_start_isoc_ddma()
938 struct dwc2_hsotg_req *hs_req, in dwc2_hsotg_start_req() argument
941 struct usb_request *ureq = &hs_req->req; in dwc2_hsotg_start_req()
958 } else if (hs_ep->req != hs_req && continuing) { in dwc2_hsotg_start_req()
1040 hs_ep->req = hs_req; in dwc2_hsotg_start_req()
1122 dwc2_hsotg_write_fifo(hsotg, hs_ep, hs_req); in dwc2_hsotg_start_req()
1176 struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_handle_unaligned_buf_start() argument
1178 void *req_buf = hs_req->req.buf; in dwc2_hsotg_handle_unaligned_buf_start()
1184 WARN_ON(hs_req->saved_req_buf); in dwc2_hsotg_handle_unaligned_buf_start()
1187 hs_ep->ep.name, req_buf, hs_req->req.length); in dwc2_hsotg_handle_unaligned_buf_start()
1189 hs_req->req.buf = kmalloc(hs_req->req.length, GFP_ATOMIC); in dwc2_hsotg_handle_unaligned_buf_start()
1190 if (!hs_req->req.buf) { in dwc2_hsotg_handle_unaligned_buf_start()
1191 hs_req->req.buf = req_buf; in dwc2_hsotg_handle_unaligned_buf_start()
1199 hs_req->saved_req_buf = req_buf; in dwc2_hsotg_handle_unaligned_buf_start()
1202 memcpy(hs_req->req.buf, req_buf, hs_req->req.length); in dwc2_hsotg_handle_unaligned_buf_start()
1209 struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_handle_unaligned_buf_complete() argument
1212 if (!using_dma(hsotg) || !hs_req->saved_req_buf) in dwc2_hsotg_handle_unaligned_buf_complete()
1216 hs_ep->ep.name, hs_req->req.status, hs_req->req.actual); in dwc2_hsotg_handle_unaligned_buf_complete()
1219 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
1220 memcpy(hs_req->saved_req_buf, hs_req->req.buf, in dwc2_hsotg_handle_unaligned_buf_complete()
1221 hs_req->req.actual); in dwc2_hsotg_handle_unaligned_buf_complete()
1224 kfree(hs_req->req.buf); in dwc2_hsotg_handle_unaligned_buf_complete()
1226 hs_req->req.buf = hs_req->saved_req_buf; in dwc2_hsotg_handle_unaligned_buf_complete()
1227 hs_req->saved_req_buf = NULL; in dwc2_hsotg_handle_unaligned_buf_complete()
1292 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_ep_queue() local
1313 INIT_LIST_HEAD(&hs_req->queue); in dwc2_hsotg_ep_queue()
1335 ret = dwc2_hsotg_handle_unaligned_buf_start(hs, hs_ep, hs_req); in dwc2_hsotg_ep_queue()
1353 list_add_tail(&hs_req->queue, &hs_ep->queue); in dwc2_hsotg_ep_queue()
1363 dwc2_gadget_fill_isoc_desc(hs_ep, hs_req->req.dma, in dwc2_hsotg_ep_queue()
1364 hs_req->req.length); in dwc2_hsotg_ep_queue()
1371 dwc2_hsotg_start_req(hs, hs_ep, hs_req, false); in dwc2_hsotg_ep_queue()
1386 dwc2_hsotg_start_req(hs, hs_ep, hs_req, false); in dwc2_hsotg_ep_queue()
1409 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_ep_free_request() local
1411 kfree(hs_req); in dwc2_hsotg_ep_free_request()
1621 struct dwc2_hsotg_req *hs_req; in dwc2_gadget_start_next_request() local
1625 hs_req = get_ep_head(hs_ep); in dwc2_gadget_start_next_request()
1626 dwc2_hsotg_start_req(hsotg, hs_ep, hs_req, false); in dwc2_gadget_start_next_request()
1653 struct dwc2_hsotg_req *hs_req; in dwc2_hsotg_process_req_feature() local
1727 hs_req = ep->req; in dwc2_hsotg_process_req_feature()
1729 list_del_init(&hs_req->queue); in dwc2_hsotg_process_req_feature()
1730 if (hs_req->req.complete) { in dwc2_hsotg_process_req_feature()
1733 &ep->ep, &hs_req->req); in dwc2_hsotg_process_req_feature()
1907 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_enqueue_setup() local
1917 if (!list_empty(&hs_req->queue)) { in dwc2_hsotg_enqueue_setup()
1986 struct dwc2_hsotg_req *hs_req, in dwc2_hsotg_complete_request() argument
1989 if (!hs_req) { in dwc2_hsotg_complete_request()
1995 hs_ep, hs_ep->ep.name, hs_req, result, hs_req->req.complete); in dwc2_hsotg_complete_request()
2002 if (hs_req->req.status == -EINPROGRESS) in dwc2_hsotg_complete_request()
2003 hs_req->req.status = result; in dwc2_hsotg_complete_request()
2006 dwc2_hsotg_unmap_dma(hsotg, hs_ep, hs_req); in dwc2_hsotg_complete_request()
2008 dwc2_hsotg_handle_unaligned_buf_complete(hsotg, hs_ep, hs_req); in dwc2_hsotg_complete_request()
2011 list_del_init(&hs_req->queue); in dwc2_hsotg_complete_request()
2018 if (hs_req->req.complete) { in dwc2_hsotg_complete_request()
2020 usb_gadget_giveback_request(&hs_ep->ep, &hs_req->req); in dwc2_hsotg_complete_request()
2050 struct dwc2_hsotg_req *hs_req; in dwc2_gadget_complete_isoc_request_ddma() local
2061 hs_req = get_ep_head(hs_ep); in dwc2_gadget_complete_isoc_request_ddma()
2062 if (!hs_req) { in dwc2_gadget_complete_isoc_request_ddma()
2066 ureq = &hs_req->req; in dwc2_gadget_complete_isoc_request_ddma()
2083 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_gadget_complete_isoc_request_ddma()
2127 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_rx_data() local
2132 if (!hs_req) { in dwc2_hsotg_rx_data()
2148 read_ptr = hs_req->req.actual; in dwc2_hsotg_rx_data()
2149 max_req = hs_req->req.length - read_ptr; in dwc2_hsotg_rx_data()
2152 __func__, to_read, max_req, read_ptr, hs_req->req.length); in dwc2_hsotg_rx_data()
2165 hs_req->req.actual += to_read; in dwc2_hsotg_rx_data()
2173 hs_req->req.buf + read_ptr, to_read); in dwc2_hsotg_rx_data()
2253 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_handle_outdone() local
2254 struct usb_request *req = &hs_req->req; in dwc2_hsotg_handle_outdone()
2258 if (!hs_req) { in dwc2_hsotg_handle_outdone()
2265 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_hsotg_handle_outdone()
2293 dwc2_hsotg_start_req(hsotg, hs_ep, hs_req, true); in dwc2_hsotg_handle_outdone()
2326 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, result); in dwc2_hsotg_handle_outdone()
2519 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_trytx() local
2521 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
2532 if (hs_req->req.actual < hs_req->req.length) { in dwc2_hsotg_trytx()
2535 return dwc2_hsotg_write_fifo(hsotg, hs_ep, hs_req); in dwc2_hsotg_trytx()
2552 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_complete_in() local
2556 if (!hs_req) { in dwc2_hsotg_complete_in()
2571 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_hsotg_complete_in()
2608 if (hs_req->req.actual != size_done) in dwc2_hsotg_complete_in()
2610 __func__, hs_req->req.actual, size_done); in dwc2_hsotg_complete_in()
2612 hs_req->req.actual = size_done; in dwc2_hsotg_complete_in()
2614 hs_req->req.length, hs_req->req.actual, hs_req->req.zero); in dwc2_hsotg_complete_in()
2616 if (!size_left && hs_req->req.actual < hs_req->req.length) { in dwc2_hsotg_complete_in()
2618 dwc2_hsotg_start_req(hsotg, hs_ep, hs_req, true); in dwc2_hsotg_complete_in()
2636 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_hsotg_complete_in()
2683 struct dwc2_hsotg_req *hs_req; in dwc2_gadget_handle_ep_disabled() local
2725 hs_req = get_ep_head(hs_ep); in dwc2_gadget_handle_ep_disabled()
2726 if (hs_req) in dwc2_gadget_handle_ep_disabled()
2727 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, in dwc2_gadget_handle_ep_disabled()
4063 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_ep_dequeue() local
4072 if (!on_list(hs_ep, hs_req)) { in dwc2_hsotg_ep_dequeue()
4081 dwc2_hsotg_complete_request(hs, hs_ep, hs_req, -ECONNRESET); in dwc2_hsotg_ep_dequeue()