Lines Matching refs:urb
209 struct devrequest *setup, urb_priv_t *urb,
249 static void urb_free_priv(urb_priv_t *urb) in urb_free_priv() argument
255 last = urb->length - 1; in urb_free_priv()
258 td = urb->td[i]; in urb_free_priv()
261 urb->td[i] = NULL; in urb_free_priv()
265 free(urb); in urb_free_priv()
508 int sohci_submit_job(ohci_t *ohci, ohci_dev_t *ohci_dev, urb_priv_t *urb, in sohci_submit_job() argument
512 urb_priv_t *purb_priv = urb; in sohci_submit_job()
514 struct usb_device *dev = urb->dev; in sohci_submit_job()
515 unsigned long pipe = urb->pipe; in sohci_submit_job()
516 void *buffer = urb->transfer_buffer; in sohci_submit_job()
517 int transfer_len = urb->transfer_buffer_length; in sohci_submit_job()
518 int interval = urb->interval; in sohci_submit_job()
529 urb->finished = 0; in sohci_submit_job()
552 ed->purb = urb; in sohci_submit_job()
951 struct devrequest *setup, urb_priv_t *urb, in td_submit_job() argument
971 urb->td_cnt = 0; in td_submit_job()
983 data, 4096, dev, cnt, urb); in td_submit_job()
989 data_len, dev, cnt, urb); in td_submit_job()
1002 td_fill(ohci, info, setup, 8, dev, cnt++, urb); in td_submit_job()
1010 td_fill(ohci, info, data, data_len, dev, cnt++, urb); in td_submit_job()
1017 td_fill(ohci, info, data, 0, dev, cnt++, urb); in td_submit_job()
1026 info = usb_pipeout(urb->pipe)? in td_submit_job()
1029 td_fill(ohci, info, data, data_len, dev, cnt++, urb); in td_submit_job()
1032 if (urb->length != cnt) in td_submit_job()
1033 dbg("TD LENGTH %d != CNT %d", urb->length, cnt); in td_submit_job()
1118 static void finish_urb(ohci_t *ohci, urb_priv_t *urb, int status) in finish_urb() argument
1120 if ((status & (ED_OPER | ED_UNLINK)) && (urb->state != URB_DEL)) in finish_urb()
1121 urb->finished = 1; in finish_urb()
1495 urb_priv_t *urb; in ohci_alloc_urb() local
1497 urb = calloc(1, sizeof(urb_priv_t)); in ohci_alloc_urb()
1498 if (!urb) { in ohci_alloc_urb()
1503 urb->dev = dev; in ohci_alloc_urb()
1504 urb->pipe = pipe; in ohci_alloc_urb()
1505 urb->transfer_buffer = buffer; in ohci_alloc_urb()
1506 urb->transfer_buffer_length = transfer_len; in ohci_alloc_urb()
1507 urb->interval = interval; in ohci_alloc_urb()
1509 return urb; in ohci_alloc_urb()
1519 urb_priv_t *urb; in submit_common_msg() local
1522 urb = ohci_alloc_urb(dev, pipe, buffer, transfer_len, interval); in submit_common_msg()
1523 if (!urb) in submit_common_msg()
1527 urb->actual_length = 0; in submit_common_msg()
1528 pkt_print(ohci, urb, dev, pipe, buffer, transfer_len, in submit_common_msg()
1543 if (sohci_submit_job(ohci, ohci_dev, urb, setup) < 0) { in submit_common_msg()
1573 if ((stat >= 0) && (stat != 0xff) && (urb->finished)) { in submit_common_msg()
1580 if (!urb->finished) in submit_common_msg()
1587 urb->finished = 1; in submit_common_msg()
1594 dev->act_len = urb->actual_length; in submit_common_msg()
1600 pkt_print(ohci, urb, dev, pipe, buffer, transfer_len, in submit_common_msg()
1605 urb_free_priv(urb); in submit_common_msg()
1614 urb_priv_t *urb[MAX_INT_QUEUESIZE]; member
1639 queue->urb[i] = ohci_alloc_urb(udev, pipe, in _ohci_create_int_queue()
1642 if (!queue->urb[i]) in _ohci_create_int_queue()
1645 if (sohci_submit_job(ohci, ohci_dev, queue->urb[i], NULL)) { in _ohci_create_int_queue()
1647 urb_free_priv(queue->urb[i]); in _ohci_create_int_queue()
1672 if (queue->urb[queue->curr_urb]->finished) { in _ohci_poll_int_queue()
1673 void *ret = queue->urb[queue->curr_urb]->transfer_buffer; in _ohci_poll_int_queue()
1687 urb_free_priv(queue->urb[i]); in _ohci_destroy_int_queue()