Lines Matching refs:urb
74 struct urb *urb; member
165 struct urb *urb, in usbhsh_ureq_alloc() argument
179 ureq->urb = urb; in usbhsh_ureq_alloc()
180 usbhsh_urb_to_ureq(urb) = ureq; in usbhsh_ureq_alloc()
188 usbhsh_urb_to_ureq(ureq->urb) = NULL; in usbhsh_ureq_free()
189 ureq->urb = NULL; in usbhsh_ureq_free()
213 struct urb *urb, in usbhsh_endpoint_sequence_save() argument
216 int len = urb->actual_length; in usbhsh_endpoint_sequence_save()
217 int maxp = usb_endpoint_maxp(&urb->ep->desc); in usbhsh_endpoint_sequence_save()
221 if (usb_pipecontrol(urb->pipe)) in usbhsh_endpoint_sequence_save()
249 usb_dotoggle(urb->dev, in usbhsh_endpoint_sequence_save()
250 usb_pipeendpoint(urb->pipe), in usbhsh_endpoint_sequence_save()
251 usb_pipeout(urb->pipe)); in usbhsh_endpoint_sequence_save()
255 struct urb *urb);
258 struct urb *urb) in usbhsh_pipe_attach() argument
261 struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep); in usbhsh_pipe_attach()
262 struct usbhsh_device *udev = usbhsh_device_get(hpriv, urb); in usbhsh_pipe_attach()
264 struct usb_endpoint_descriptor *desc = &urb->ep->desc; in usbhsh_pipe_attach()
267 int dir_in_req = !!usb_pipein(urb->pipe); in usbhsh_pipe_attach()
379 struct urb *urb, in usbhsh_endpoint_attach() argument
383 struct usbhsh_device *udev = usbhsh_device_get(hpriv, urb); in usbhsh_endpoint_attach()
384 struct usb_host_endpoint *ep = urb->ep; in usbhsh_endpoint_attach()
480 struct urb *urb) in usbhsh_device_get() argument
482 struct usb_device *usbv = usbhsh_urb_to_usbv(urb); in usbhsh_device_get()
490 if (0 == usb_pipedevice(urb->pipe)) in usbhsh_device_get()
498 struct urb *urb) in usbhsh_device_attach() argument
505 struct usb_device *usbv = usbhsh_urb_to_usbv(urb); in usbhsh_device_attach()
518 if (0 != usb_pipedevice(urb->pipe)) { in usbhsh_device_attach()
649 struct urb *urb = ureq->urb; in usbhsh_queue_done() local
655 if (!urb) { in usbhsh_queue_done()
663 urb->actual_length = pkt->actual; in usbhsh_queue_done()
665 usbhsh_endpoint_sequence_save(hpriv, urb, pkt); in usbhsh_queue_done()
668 usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep)); in usbhsh_queue_done()
670 usb_hcd_unlink_urb_from_ep(hcd, urb); in usbhsh_queue_done()
671 usb_hcd_giveback_urb(hcd, urb, status); in usbhsh_queue_done()
675 struct urb *urb, in usbhsh_queue_push() argument
679 struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep); in usbhsh_queue_push()
686 if (usb_pipeisoc(urb->pipe)) { in usbhsh_queue_push()
692 ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); in usbhsh_queue_push()
698 if (usb_pipein(urb->pipe)) in usbhsh_queue_push()
703 buf = (void *)(urb->transfer_buffer + urb->actual_length); in usbhsh_queue_push()
704 len = urb->transfer_buffer_length - urb->actual_length; in usbhsh_queue_push()
706 sequence = usb_gettoggle(urb->dev, in usbhsh_queue_push()
707 usb_pipeendpoint(urb->pipe), in usbhsh_queue_push()
708 usb_pipeout(urb->pipe)); in usbhsh_queue_push()
712 buf, len, (urb->transfer_flags & URB_ZERO_PACKET), in usbhsh_queue_push()
751 static int usbhsh_is_request_address(struct urb *urb) in usbhsh_is_request_address() argument
755 req = (struct usb_ctrlrequest *)urb->setup_packet; in usbhsh_is_request_address()
765 struct urb *urb, in usbhsh_setup_stage_packet_push() argument
781 memcpy(&req, urb->setup_packet, sizeof(struct usb_ctrlrequest)); in usbhsh_setup_stage_packet_push()
789 if (usbhsh_is_request_address(urb)) { in usbhsh_setup_stage_packet_push()
790 struct usb_device *usbv = usbhsh_urb_to_usbv(urb); in usbhsh_setup_stage_packet_push()
824 struct urb *urb, in usbhsh_data_stage_packet_push() argument
832 ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); in usbhsh_data_stage_packet_push()
836 if (usb_pipein(urb->pipe)) in usbhsh_data_stage_packet_push()
843 urb->transfer_buffer, in usbhsh_data_stage_packet_push()
844 urb->transfer_buffer_length, in usbhsh_data_stage_packet_push()
845 (urb->transfer_flags & URB_ZERO_PACKET), in usbhsh_data_stage_packet_push()
855 struct urb *urb, in usbhsh_status_stage_packet_push() argument
862 ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); in usbhsh_status_stage_packet_push()
866 if (usb_pipein(urb->pipe)) in usbhsh_status_stage_packet_push()
874 urb->transfer_buffer_length, in usbhsh_status_stage_packet_push()
881 struct urb *urb, in usbhsh_dcp_queue_push() argument
885 struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep); in usbhsh_dcp_queue_push()
897 usbhsh_setup_stage_packet_push(hpriv, urb, pipe); in usbhsh_dcp_queue_push()
904 if (urb->transfer_buffer_length) { in usbhsh_dcp_queue_push()
905 ret = usbhsh_data_stage_packet_push(hpriv, urb, pipe, mflags); in usbhsh_dcp_queue_push()
915 ret = usbhsh_status_stage_packet_push(hpriv, urb, pipe, mflags); in usbhsh_dcp_queue_push()
936 struct urb *urb = ureq->urb; in usbhsh_dma_map_ctrl() local
939 if (urb->num_sgs) in usbhsh_dma_map_ctrl()
942 pkt->dma = urb->transfer_dma; in usbhsh_dma_map_ctrl()
963 struct urb *urb, in usbhsh_urb_enqueue() argument
969 struct usb_host_endpoint *ep = urb->ep; in usbhsh_urb_enqueue()
971 int is_dir_in = usb_pipein(urb->pipe); in usbhsh_urb_enqueue()
982 ret = usb_hcd_link_urb_to_ep(hcd, urb); in usbhsh_urb_enqueue()
992 if (!usbhsh_device_get(hpriv, urb)) { in usbhsh_urb_enqueue()
993 new_udev = usbhsh_device_attach(hpriv, urb); in usbhsh_urb_enqueue()
1006 ret = usbhsh_endpoint_attach(hpriv, urb, mem_flags); in usbhsh_urb_enqueue()
1017 ret = usbhsh_pipe_attach(hpriv, urb); in usbhsh_urb_enqueue()
1026 if (usb_pipecontrol(urb->pipe)) in usbhsh_urb_enqueue()
1027 ret = usbhsh_dcp_queue_push(hcd, urb, mem_flags); in usbhsh_urb_enqueue()
1029 ret = usbhsh_queue_push(hcd, urb, mem_flags); in usbhsh_urb_enqueue()
1045 static int usbhsh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) in usbhsh_urb_dequeue() argument
1048 struct usbhsh_request *ureq = usbhsh_urb_to_ureq(urb); in usbhsh_urb_dequeue()