Lines Matching refs:hs_req
284 struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_unmap_dma() argument
286 struct usb_request *req = &hs_req->req; in dwc2_hsotg_unmap_dma()
289 if (hs_req->req.length == 0) in dwc2_hsotg_unmap_dma()
313 struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_write_fifo() argument
317 int buf_pos = hs_req->req.actual; in dwc2_hsotg_write_fifo()
448 to_write, hs_req->req.length, can_write, buf_pos); in dwc2_hsotg_write_fifo()
453 hs_req->req.actual = buf_pos + to_write; in dwc2_hsotg_write_fifo()
460 data = hs_req->req.buf + buf_pos; in dwc2_hsotg_write_fifo()
518 struct dwc2_hsotg_req *hs_req, in dwc2_hsotg_start_req() argument
521 struct usb_request *ureq = &hs_req->req; in dwc2_hsotg_start_req()
537 } else if (hs_ep->req != hs_req && continuing) { in dwc2_hsotg_start_req()
614 hs_ep->req = hs_req; in dwc2_hsotg_start_req()
658 dwc2_hsotg_write_fifo(hsotg, hs_ep, hs_req); in dwc2_hsotg_start_req()
703 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_map_dma() local
707 if (hs_req->req.length == 0) in dwc2_hsotg_map_dma()
724 struct dwc2_hsotg_ep *hs_ep, struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_handle_unaligned_buf_start() argument
726 void *req_buf = hs_req->req.buf; in dwc2_hsotg_handle_unaligned_buf_start()
732 WARN_ON(hs_req->saved_req_buf); in dwc2_hsotg_handle_unaligned_buf_start()
735 hs_ep->ep.name, req_buf, hs_req->req.length); in dwc2_hsotg_handle_unaligned_buf_start()
737 hs_req->req.buf = kmalloc(hs_req->req.length, GFP_ATOMIC); in dwc2_hsotg_handle_unaligned_buf_start()
738 if (!hs_req->req.buf) { in dwc2_hsotg_handle_unaligned_buf_start()
739 hs_req->req.buf = req_buf; in dwc2_hsotg_handle_unaligned_buf_start()
747 hs_req->saved_req_buf = req_buf; in dwc2_hsotg_handle_unaligned_buf_start()
750 memcpy(hs_req->req.buf, req_buf, hs_req->req.length); in dwc2_hsotg_handle_unaligned_buf_start()
755 struct dwc2_hsotg_ep *hs_ep, struct dwc2_hsotg_req *hs_req) in dwc2_hsotg_handle_unaligned_buf_complete() argument
758 if (!using_dma(hsotg) || !hs_req->saved_req_buf) in dwc2_hsotg_handle_unaligned_buf_complete()
762 hs_ep->ep.name, hs_req->req.status, hs_req->req.actual); in dwc2_hsotg_handle_unaligned_buf_complete()
765 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
766 memcpy(hs_req->saved_req_buf, hs_req->req.buf, in dwc2_hsotg_handle_unaligned_buf_complete()
767 hs_req->req.actual); in dwc2_hsotg_handle_unaligned_buf_complete()
770 kfree(hs_req->req.buf); in dwc2_hsotg_handle_unaligned_buf_complete()
772 hs_req->req.buf = hs_req->saved_req_buf; in dwc2_hsotg_handle_unaligned_buf_complete()
773 hs_req->saved_req_buf = NULL; in dwc2_hsotg_handle_unaligned_buf_complete()
779 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_ep_queue() local
797 INIT_LIST_HEAD(&hs_req->queue); in dwc2_hsotg_ep_queue()
801 ret = dwc2_hsotg_handle_unaligned_buf_start(hs, hs_ep, hs_req); in dwc2_hsotg_ep_queue()
813 list_add_tail(&hs_req->queue, &hs_ep->queue); in dwc2_hsotg_ep_queue()
816 dwc2_hsotg_start_req(hs, hs_ep, hs_req, false); in dwc2_hsotg_ep_queue()
839 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_ep_free_request() local
841 kfree(hs_req); in dwc2_hsotg_ep_free_request()
1046 struct dwc2_hsotg_req *hs_req; in dwc2_hsotg_process_req_feature() local
1117 hs_req = ep->req; in dwc2_hsotg_process_req_feature()
1119 list_del_init(&hs_req->queue); in dwc2_hsotg_process_req_feature()
1120 if (hs_req->req.complete) { in dwc2_hsotg_process_req_feature()
1123 &ep->ep, &hs_req->req); in dwc2_hsotg_process_req_feature()
1132 hs_req = get_ep_head(ep); in dwc2_hsotg_process_req_feature()
1134 hs_req, false); in dwc2_hsotg_process_req_feature()
1303 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_enqueue_setup() local
1313 if (!list_empty(&hs_req->queue)) { in dwc2_hsotg_enqueue_setup()
1373 struct dwc2_hsotg_req *hs_req, in dwc2_hsotg_complete_request() argument
1378 if (!hs_req) { in dwc2_hsotg_complete_request()
1384 hs_ep, hs_ep->ep.name, hs_req, result, hs_req->req.complete); in dwc2_hsotg_complete_request()
1391 if (hs_req->req.status == -EINPROGRESS) in dwc2_hsotg_complete_request()
1392 hs_req->req.status = result; in dwc2_hsotg_complete_request()
1395 dwc2_hsotg_unmap_dma(hsotg, hs_ep, hs_req); in dwc2_hsotg_complete_request()
1397 dwc2_hsotg_handle_unaligned_buf_complete(hsotg, hs_ep, hs_req); in dwc2_hsotg_complete_request()
1400 list_del_init(&hs_req->queue); in dwc2_hsotg_complete_request()
1407 if (hs_req->req.complete) { in dwc2_hsotg_complete_request()
1409 usb_gadget_giveback_request(&hs_ep->ep, &hs_req->req); in dwc2_hsotg_complete_request()
1422 hs_req = get_ep_head(hs_ep); in dwc2_hsotg_complete_request()
1423 dwc2_hsotg_start_req(hsotg, hs_ep, hs_req, false); in dwc2_hsotg_complete_request()
1441 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_rx_data() local
1448 if (!hs_req) { in dwc2_hsotg_rx_data()
1464 read_ptr = hs_req->req.actual; in dwc2_hsotg_rx_data()
1465 max_req = hs_req->req.length - read_ptr; in dwc2_hsotg_rx_data()
1468 __func__, to_read, max_req, read_ptr, hs_req->req.length); in dwc2_hsotg_rx_data()
1481 hs_req->req.actual += to_read; in dwc2_hsotg_rx_data()
1488 ioread32_rep(fifo, hs_req->req.buf + read_ptr, to_read); in dwc2_hsotg_rx_data()
1538 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_handle_outdone() local
1539 struct usb_request *req = &hs_req->req; in dwc2_hsotg_handle_outdone()
1543 if (!hs_req) { in dwc2_hsotg_handle_outdone()
1550 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_hsotg_handle_outdone()
1575 dwc2_hsotg_start_req(hsotg, hs_ep, hs_req, true); in dwc2_hsotg_handle_outdone()
1605 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, result); in dwc2_hsotg_handle_outdone()
1832 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_trytx() local
1834 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
1845 if (hs_req->req.actual < hs_req->req.length) { in dwc2_hsotg_trytx()
1848 return dwc2_hsotg_write_fifo(hsotg, hs_ep, hs_req); in dwc2_hsotg_trytx()
1865 struct dwc2_hsotg_req *hs_req = hs_ep->req; in dwc2_hsotg_complete_in() local
1869 if (!hs_req) { in dwc2_hsotg_complete_in()
1877 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_hsotg_complete_in()
1908 if (hs_req->req.actual != size_done) in dwc2_hsotg_complete_in()
1910 __func__, hs_req->req.actual, size_done); in dwc2_hsotg_complete_in()
1912 hs_req->req.actual = size_done; in dwc2_hsotg_complete_in()
1914 hs_req->req.length, hs_req->req.actual, hs_req->req.zero); in dwc2_hsotg_complete_in()
1916 if (!size_left && hs_req->req.actual < hs_req->req.length) { in dwc2_hsotg_complete_in()
1918 dwc2_hsotg_start_req(hsotg, hs_ep, hs_req, true); in dwc2_hsotg_complete_in()
1936 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in dwc2_hsotg_complete_in()
2958 struct dwc2_hsotg_req *hs_req = our_req(req); in dwc2_hsotg_ep_dequeue() local
2967 if (!on_list(hs_ep, hs_req)) { in dwc2_hsotg_ep_dequeue()
2976 dwc2_hsotg_complete_request(hs, hs_ep, hs_req, -ECONNRESET); in dwc2_hsotg_ep_dequeue()