Lines Matching refs:hs_req

290 				struct s3c_hsotg_req *hs_req)  in s3c_hsotg_unmap_dma()  argument
292 struct usb_request *req = &hs_req->req; in s3c_hsotg_unmap_dma()
295 if (hs_req->req.length == 0) in s3c_hsotg_unmap_dma()
319 struct s3c_hsotg_req *hs_req) in s3c_hsotg_write_fifo() argument
323 int buf_pos = hs_req->req.actual; in s3c_hsotg_write_fifo()
454 to_write, hs_req->req.length, can_write, buf_pos); in s3c_hsotg_write_fifo()
459 hs_req->req.actual = buf_pos + to_write; in s3c_hsotg_write_fifo()
466 data = hs_req->req.buf + buf_pos; in s3c_hsotg_write_fifo()
524 struct s3c_hsotg_req *hs_req, in s3c_hsotg_start_req() argument
527 struct usb_request *ureq = &hs_req->req; in s3c_hsotg_start_req()
543 } else if (hs_ep->req != hs_req && continuing) { in s3c_hsotg_start_req()
620 hs_ep->req = hs_req; in s3c_hsotg_start_req()
664 s3c_hsotg_write_fifo(hsotg, hs_ep, hs_req); in s3c_hsotg_start_req()
709 struct s3c_hsotg_req *hs_req = our_req(req); in s3c_hsotg_map_dma() local
713 if (hs_req->req.length == 0) in s3c_hsotg_map_dma()
730 struct s3c_hsotg_ep *hs_ep, struct s3c_hsotg_req *hs_req) in s3c_hsotg_handle_unaligned_buf_start() argument
732 void *req_buf = hs_req->req.buf; in s3c_hsotg_handle_unaligned_buf_start()
738 WARN_ON(hs_req->saved_req_buf); in s3c_hsotg_handle_unaligned_buf_start()
741 hs_ep->ep.name, req_buf, hs_req->req.length); in s3c_hsotg_handle_unaligned_buf_start()
743 hs_req->req.buf = kmalloc(hs_req->req.length, GFP_ATOMIC); in s3c_hsotg_handle_unaligned_buf_start()
744 if (!hs_req->req.buf) { in s3c_hsotg_handle_unaligned_buf_start()
745 hs_req->req.buf = req_buf; in s3c_hsotg_handle_unaligned_buf_start()
753 hs_req->saved_req_buf = req_buf; in s3c_hsotg_handle_unaligned_buf_start()
756 memcpy(hs_req->req.buf, req_buf, hs_req->req.length); in s3c_hsotg_handle_unaligned_buf_start()
761 struct s3c_hsotg_ep *hs_ep, struct s3c_hsotg_req *hs_req) in s3c_hsotg_handle_unaligned_buf_complete() argument
764 if (!using_dma(hsotg) || !hs_req->saved_req_buf) in s3c_hsotg_handle_unaligned_buf_complete()
768 hs_ep->ep.name, hs_req->req.status, hs_req->req.actual); in s3c_hsotg_handle_unaligned_buf_complete()
771 if (!hs_ep->dir_in && !hs_req->req.status) in s3c_hsotg_handle_unaligned_buf_complete()
772 memcpy(hs_req->saved_req_buf, hs_req->req.buf, in s3c_hsotg_handle_unaligned_buf_complete()
773 hs_req->req.actual); in s3c_hsotg_handle_unaligned_buf_complete()
776 kfree(hs_req->req.buf); in s3c_hsotg_handle_unaligned_buf_complete()
778 hs_req->req.buf = hs_req->saved_req_buf; in s3c_hsotg_handle_unaligned_buf_complete()
779 hs_req->saved_req_buf = NULL; in s3c_hsotg_handle_unaligned_buf_complete()
785 struct s3c_hsotg_req *hs_req = our_req(req); in s3c_hsotg_ep_queue() local
796 INIT_LIST_HEAD(&hs_req->queue); in s3c_hsotg_ep_queue()
800 ret = s3c_hsotg_handle_unaligned_buf_start(hs, hs_ep, hs_req); in s3c_hsotg_ep_queue()
812 list_add_tail(&hs_req->queue, &hs_ep->queue); in s3c_hsotg_ep_queue()
815 s3c_hsotg_start_req(hs, hs_ep, hs_req, false); in s3c_hsotg_ep_queue()
838 struct s3c_hsotg_req *hs_req = our_req(req); in s3c_hsotg_ep_free_request() local
840 kfree(hs_req); in s3c_hsotg_ep_free_request()
1045 struct s3c_hsotg_req *hs_req; in s3c_hsotg_process_req_feature() local
1116 hs_req = ep->req; in s3c_hsotg_process_req_feature()
1118 list_del_init(&hs_req->queue); in s3c_hsotg_process_req_feature()
1119 if (hs_req->req.complete) { in s3c_hsotg_process_req_feature()
1122 &ep->ep, &hs_req->req); in s3c_hsotg_process_req_feature()
1131 hs_req = get_ep_head(ep); in s3c_hsotg_process_req_feature()
1133 hs_req, false); in s3c_hsotg_process_req_feature()
1301 struct s3c_hsotg_req *hs_req = our_req(req); in s3c_hsotg_enqueue_setup() local
1311 if (!list_empty(&hs_req->queue)) { in s3c_hsotg_enqueue_setup()
1371 struct s3c_hsotg_req *hs_req, in s3c_hsotg_complete_request() argument
1376 if (!hs_req) { in s3c_hsotg_complete_request()
1382 hs_ep, hs_ep->ep.name, hs_req, result, hs_req->req.complete); in s3c_hsotg_complete_request()
1389 if (hs_req->req.status == -EINPROGRESS) in s3c_hsotg_complete_request()
1390 hs_req->req.status = result; in s3c_hsotg_complete_request()
1392 s3c_hsotg_handle_unaligned_buf_complete(hsotg, hs_ep, hs_req); in s3c_hsotg_complete_request()
1395 list_del_init(&hs_req->queue); in s3c_hsotg_complete_request()
1398 s3c_hsotg_unmap_dma(hsotg, hs_ep, hs_req); in s3c_hsotg_complete_request()
1405 if (hs_req->req.complete) { in s3c_hsotg_complete_request()
1407 usb_gadget_giveback_request(&hs_ep->ep, &hs_req->req); in s3c_hsotg_complete_request()
1420 hs_req = get_ep_head(hs_ep); in s3c_hsotg_complete_request()
1421 s3c_hsotg_start_req(hsotg, hs_ep, hs_req, false); in s3c_hsotg_complete_request()
1439 struct s3c_hsotg_req *hs_req = hs_ep->req; in s3c_hsotg_rx_data() local
1446 if (!hs_req) { in s3c_hsotg_rx_data()
1462 read_ptr = hs_req->req.actual; in s3c_hsotg_rx_data()
1463 max_req = hs_req->req.length - read_ptr; in s3c_hsotg_rx_data()
1466 __func__, to_read, max_req, read_ptr, hs_req->req.length); in s3c_hsotg_rx_data()
1479 hs_req->req.actual += to_read; in s3c_hsotg_rx_data()
1486 ioread32_rep(fifo, hs_req->req.buf + read_ptr, to_read); in s3c_hsotg_rx_data()
1523 struct s3c_hsotg_req *hs_req = hs_ep->req; in s3c_hsotg_handle_outdone() local
1524 struct usb_request *req = &hs_req->req; in s3c_hsotg_handle_outdone()
1528 if (!hs_req) { in s3c_hsotg_handle_outdone()
1535 s3c_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in s3c_hsotg_handle_outdone()
1560 s3c_hsotg_start_req(hsotg, hs_ep, hs_req, true); in s3c_hsotg_handle_outdone()
1580 s3c_hsotg_complete_request(hsotg, hs_ep, hs_req, result); in s3c_hsotg_handle_outdone()
1807 struct s3c_hsotg_req *hs_req = hs_ep->req; in s3c_hsotg_trytx() local
1809 if (!hs_ep->dir_in || !hs_req) { in s3c_hsotg_trytx()
1820 if (hs_req->req.actual < hs_req->req.length) { in s3c_hsotg_trytx()
1823 return s3c_hsotg_write_fifo(hsotg, hs_ep, hs_req); in s3c_hsotg_trytx()
1840 struct s3c_hsotg_req *hs_req = hs_ep->req; in s3c_hsotg_complete_in() local
1844 if (!hs_req) { in s3c_hsotg_complete_in()
1852 s3c_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in s3c_hsotg_complete_in()
1883 if (hs_req->req.actual != size_done) in s3c_hsotg_complete_in()
1885 __func__, hs_req->req.actual, size_done); in s3c_hsotg_complete_in()
1887 hs_req->req.actual = size_done; in s3c_hsotg_complete_in()
1889 hs_req->req.length, hs_req->req.actual, hs_req->req.zero); in s3c_hsotg_complete_in()
1891 if (!size_left && hs_req->req.actual < hs_req->req.length) { in s3c_hsotg_complete_in()
1893 s3c_hsotg_start_req(hsotg, hs_ep, hs_req, true); in s3c_hsotg_complete_in()
1911 s3c_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); in s3c_hsotg_complete_in()
2819 struct s3c_hsotg_req *hs_req = our_req(req); in s3c_hsotg_ep_dequeue() local
2828 if (!on_list(hs_ep, hs_req)) { in s3c_hsotg_ep_dequeue()
2833 s3c_hsotg_complete_request(hs, hs_ep, hs_req, -ECONNRESET); in s3c_hsotg_ep_dequeue()