Lines Matching refs:urb
65 struct urb *urb; member
156 struct urb *urb, in usbhsh_ureq_alloc() argument
166 ureq->urb = urb; in usbhsh_ureq_alloc()
167 usbhsh_urb_to_ureq(urb) = ureq; in usbhsh_ureq_alloc()
175 usbhsh_urb_to_ureq(ureq->urb) = NULL; in usbhsh_ureq_free()
176 ureq->urb = NULL; in usbhsh_ureq_free()
200 struct urb *urb, in usbhsh_endpoint_sequence_save() argument
203 int len = urb->actual_length; in usbhsh_endpoint_sequence_save()
204 int maxp = usb_endpoint_maxp(&urb->ep->desc); in usbhsh_endpoint_sequence_save()
208 if (usb_pipecontrol(urb->pipe)) in usbhsh_endpoint_sequence_save()
236 usb_dotoggle(urb->dev, in usbhsh_endpoint_sequence_save()
237 usb_pipeendpoint(urb->pipe), in usbhsh_endpoint_sequence_save()
238 usb_pipeout(urb->pipe)); in usbhsh_endpoint_sequence_save()
242 struct urb *urb);
245 struct urb *urb) in usbhsh_pipe_attach() argument
248 struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep); in usbhsh_pipe_attach()
249 struct usbhsh_device *udev = usbhsh_device_get(hpriv, urb); in usbhsh_pipe_attach()
251 struct usb_endpoint_descriptor *desc = &urb->ep->desc; in usbhsh_pipe_attach()
254 int dir_in_req = !!usb_pipein(urb->pipe); in usbhsh_pipe_attach()
366 struct urb *urb, in usbhsh_endpoint_attach() argument
370 struct usbhsh_device *udev = usbhsh_device_get(hpriv, urb); in usbhsh_endpoint_attach()
371 struct usb_host_endpoint *ep = urb->ep; in usbhsh_endpoint_attach()
465 struct urb *urb) in usbhsh_device_get() argument
467 struct usb_device *usbv = usbhsh_urb_to_usbv(urb); in usbhsh_device_get()
475 if (0 == usb_pipedevice(urb->pipe)) in usbhsh_device_get()
483 struct urb *urb) in usbhsh_device_attach() argument
490 struct usb_device *usbv = usbhsh_urb_to_usbv(urb); in usbhsh_device_attach()
503 if (0 != usb_pipedevice(urb->pipe)) { in usbhsh_device_attach()
634 struct urb *urb = ureq->urb; in usbhsh_queue_done() local
640 if (!urb) { in usbhsh_queue_done()
648 urb->actual_length = pkt->actual; in usbhsh_queue_done()
650 usbhsh_endpoint_sequence_save(hpriv, urb, pkt); in usbhsh_queue_done()
653 usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep)); in usbhsh_queue_done()
655 usb_hcd_unlink_urb_from_ep(hcd, urb); in usbhsh_queue_done()
656 usb_hcd_giveback_urb(hcd, urb, status); in usbhsh_queue_done()
660 struct urb *urb, in usbhsh_queue_push() argument
664 struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep); in usbhsh_queue_push()
671 if (usb_pipeisoc(urb->pipe)) { in usbhsh_queue_push()
677 ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); in usbhsh_queue_push()
683 if (usb_pipein(urb->pipe)) in usbhsh_queue_push()
688 buf = (void *)(urb->transfer_buffer + urb->actual_length); in usbhsh_queue_push()
689 len = urb->transfer_buffer_length - urb->actual_length; in usbhsh_queue_push()
691 sequence = usb_gettoggle(urb->dev, in usbhsh_queue_push()
692 usb_pipeendpoint(urb->pipe), in usbhsh_queue_push()
693 usb_pipeout(urb->pipe)); in usbhsh_queue_push()
697 buf, len, (urb->transfer_flags & URB_ZERO_PACKET), in usbhsh_queue_push()
736 static int usbhsh_is_request_address(struct urb *urb) in usbhsh_is_request_address() argument
740 req = (struct usb_ctrlrequest *)urb->setup_packet; in usbhsh_is_request_address()
750 struct urb *urb, in usbhsh_setup_stage_packet_push() argument
766 memcpy(&req, urb->setup_packet, sizeof(struct usb_ctrlrequest)); in usbhsh_setup_stage_packet_push()
774 if (usbhsh_is_request_address(urb)) { in usbhsh_setup_stage_packet_push()
775 struct usb_device *usbv = usbhsh_urb_to_usbv(urb); in usbhsh_setup_stage_packet_push()
809 struct urb *urb, in usbhsh_data_stage_packet_push() argument
817 ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); in usbhsh_data_stage_packet_push()
821 if (usb_pipein(urb->pipe)) in usbhsh_data_stage_packet_push()
828 urb->transfer_buffer, in usbhsh_data_stage_packet_push()
829 urb->transfer_buffer_length, in usbhsh_data_stage_packet_push()
830 (urb->transfer_flags & URB_ZERO_PACKET), in usbhsh_data_stage_packet_push()
840 struct urb *urb, in usbhsh_status_stage_packet_push() argument
847 ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); in usbhsh_status_stage_packet_push()
851 if (usb_pipein(urb->pipe)) in usbhsh_status_stage_packet_push()
859 urb->transfer_buffer_length, in usbhsh_status_stage_packet_push()
866 struct urb *urb, in usbhsh_dcp_queue_push() argument
870 struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep); in usbhsh_dcp_queue_push()
882 usbhsh_setup_stage_packet_push(hpriv, urb, pipe); in usbhsh_dcp_queue_push()
889 if (urb->transfer_buffer_length) { in usbhsh_dcp_queue_push()
890 ret = usbhsh_data_stage_packet_push(hpriv, urb, pipe, mflags); in usbhsh_dcp_queue_push()
900 ret = usbhsh_status_stage_packet_push(hpriv, urb, pipe, mflags); in usbhsh_dcp_queue_push()
922 struct urb *urb = ureq->urb; in usbhsh_dma_map_ctrl() local
925 if (urb->num_sgs) in usbhsh_dma_map_ctrl()
928 pkt->dma = urb->transfer_dma; in usbhsh_dma_map_ctrl()
949 struct urb *urb, in usbhsh_urb_enqueue() argument
955 struct usb_host_endpoint *ep = urb->ep; in usbhsh_urb_enqueue()
957 int is_dir_in = usb_pipein(urb->pipe); in usbhsh_urb_enqueue()
968 ret = usb_hcd_link_urb_to_ep(hcd, urb); in usbhsh_urb_enqueue()
978 if (!usbhsh_device_get(hpriv, urb)) { in usbhsh_urb_enqueue()
979 new_udev = usbhsh_device_attach(hpriv, urb); in usbhsh_urb_enqueue()
992 ret = usbhsh_endpoint_attach(hpriv, urb, mem_flags); in usbhsh_urb_enqueue()
1003 ret = usbhsh_pipe_attach(hpriv, urb); in usbhsh_urb_enqueue()
1012 if (usb_pipecontrol(urb->pipe)) in usbhsh_urb_enqueue()
1013 ret = usbhsh_dcp_queue_push(hcd, urb, mem_flags); in usbhsh_urb_enqueue()
1015 ret = usbhsh_queue_push(hcd, urb, mem_flags); in usbhsh_urb_enqueue()
1031 static int usbhsh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) in usbhsh_urb_dequeue() argument
1034 struct usbhsh_request *ureq = usbhsh_urb_to_ureq(urb); in usbhsh_urb_dequeue()