Lines Matching refs:urb

19 	struct urb urb;  member
26 static void musb_host_complete_urb(struct urb *urb) in musb_host_complete_urb() argument
28 urb->dev->status &= ~USB_ST_NOT_PROC; in musb_host_complete_urb()
29 urb->dev->act_len = urb->actual_length; in musb_host_complete_urb()
32 static void construct_urb(struct urb *urb, struct usb_host_endpoint *hep, in construct_urb() argument
40 memset(urb, 0, sizeof(struct urb)); in construct_urb()
43 INIT_LIST_HEAD(&urb->urb_list); in construct_urb()
44 urb->ep = hep; in construct_urb()
45 urb->complete = musb_host_complete_urb; in construct_urb()
46 urb->status = -EINPROGRESS; in construct_urb()
47 urb->dev = dev; in construct_urb()
48 urb->pipe = pipe; in construct_urb()
49 urb->transfer_buffer = buffer; in construct_urb()
50 urb->transfer_dma = (unsigned long)buffer; in construct_urb()
51 urb->transfer_buffer_length = len; in construct_urb()
52 urb->setup_packet = (unsigned char *)setup; in construct_urb()
54 urb->ep->desc.wMaxPacketSize = in construct_urb()
57 urb->ep->desc.bmAttributes = endpoint_type; in construct_urb()
58 urb->ep->desc.bEndpointAddress = in construct_urb()
60 urb->ep->desc.bInterval = interval; in construct_urb()
63 static int submit_urb(struct usb_hcd *hcd, struct urb *urb) in submit_urb() argument
69 ret = musb_urb_enqueue(hcd, urb, 0); in submit_urb()
75 timeout = get_timer(0) + USB_TIMEOUT_MS(urb->pipe); in submit_urb()
80 } while (urb->status == -EINPROGRESS && in submit_urb()
83 if (urb->status == -EINPROGRESS) in submit_urb()
84 musb_urb_dequeue(hcd, urb, -ETIME); in submit_urb()
86 return urb->status; in submit_urb()
93 construct_urb(&host->urb, &host->hep, dev, USB_ENDPOINT_XFER_CONTROL, in _musb_submit_control_msg()
100 return submit_urb(&host->hcd, &host->urb); in _musb_submit_control_msg()
106 construct_urb(&host->urb, &host->hep, dev, USB_ENDPOINT_XFER_BULK, in _musb_submit_bulk_msg()
108 return submit_urb(&host->hcd, &host->urb); in _musb_submit_bulk_msg()
115 construct_urb(&host->urb, &host->hep, dev, USB_ENDPOINT_XFER_INT, pipe, in _musb_submit_int_msg()
117 return submit_urb(&host->hcd, &host->urb); in _musb_submit_int_msg()
141 construct_urb(&queue->urb, &queue->hep, dev, USB_ENDPOINT_XFER_INT, in _musb_create_int_queue()
144 ret = musb_urb_enqueue(&host->hcd, &queue->urb, 0); in _musb_create_int_queue()
158 int index = usb_pipein(queue->urb.pipe) * 16 + in _musb_destroy_int_queue()
159 usb_pipeendpoint(queue->urb.pipe); in _musb_destroy_int_queue()
161 if (queue->urb.status == -EINPROGRESS) in _musb_destroy_int_queue()
162 musb_urb_dequeue(&host->hcd, &queue->urb, -ETIME); in _musb_destroy_int_queue()
172 if (queue->urb.status != -EINPROGRESS) in _musb_poll_int_queue()
177 if (queue->urb.status != -EINPROGRESS) in _musb_poll_int_queue()
178 return queue->urb.transfer_buffer; /* Done */ in _musb_poll_int_queue()