Lines Matching refs:urb_priv
707 urb_priv_t *urb_priv = urb->hcpriv; in uhci_submit_control_urb() local
732 fill_td (td, status, destination | (7 << 21), urb_priv->setup_packet_dma); in uhci_submit_control_urb()
765 urb_priv->transfer_buffer_dma + (data - (char *)urb->transfer_buffer)); in uhci_submit_control_urb()
796 list_add (&qh->desc_list, &urb_priv->desc_list); in uhci_submit_control_urb()
823 urb_priv_t *urb_priv = urb->hcpriv, *upriv, *bpriv=NULL; in uhci_submit_bulk_urb() local
905 urb_priv->transfer_buffer_dma + (data - (char *)urb->transfer_buffer)); in uhci_submit_bulk_urb()
925 list_add (&qh->desc_list, &urb_priv->desc_list); in uhci_submit_bulk_urb()
953 _static void uhci_clean_iso_step1(uhci_t *s, urb_priv_t *urb_priv) in uhci_clean_iso_step1() argument
958 for (p = urb_priv->desc_list.next; p != &urb_priv->desc_list; p = p->next) { in uhci_clean_iso_step1()
964 _static void uhci_clean_iso_step2(uhci_t *s, urb_priv_t *urb_priv) in uhci_clean_iso_step2() argument
969 while ((p = urb_priv->desc_list.next) != &urb_priv->desc_list) { in uhci_clean_iso_step2()
1090 _static void uhci_urb_dma_sync(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv) in uhci_urb_dma_sync() argument
1092 if (urb_priv->setup_packet_dma) in uhci_urb_dma_sync()
1093 pci_dma_sync_single(s->uhci_pci, urb_priv->setup_packet_dma, in uhci_urb_dma_sync()
1096 if (urb_priv->transfer_buffer_dma) in uhci_urb_dma_sync()
1097 pci_dma_sync_single(s->uhci_pci, urb_priv->transfer_buffer_dma, in uhci_urb_dma_sync()
1104 _static void uhci_urb_dma_unmap(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv) in uhci_urb_dma_unmap() argument
1106 if (urb_priv->setup_packet_dma) { in uhci_urb_dma_unmap()
1107 pci_unmap_single(s->uhci_pci, urb_priv->setup_packet_dma, in uhci_urb_dma_unmap()
1109 urb_priv->setup_packet_dma = 0; in uhci_urb_dma_unmap()
1111 if (urb_priv->transfer_buffer_dma) { in uhci_urb_dma_unmap()
1112 pci_unmap_single(s->uhci_pci, urb_priv->transfer_buffer_dma, in uhci_urb_dma_unmap()
1117 urb_priv->transfer_buffer_dma = 0; in uhci_urb_dma_unmap()
1128 urb_priv_t *urb_priv; in uhci_unlink_urb_async() local
1146 urb_priv = (urb_priv_t*)urb->hcpriv; in uhci_unlink_urb_async()
1153 uhci_clean_iso_step1 (s, urb_priv); in uhci_unlink_urb_async()
1158 qh = list_entry (urb_priv->desc_list.next, uhci_desc_t, desc_list); in uhci_unlink_urb_async()
1173 urb_priv_t *urb_priv; in uhci_unlink_urb_sync() local
1184 urb_priv = urb->hcpriv; in uhci_unlink_urb_sync()
1194 uhci_clean_iso_step2(s, urb_priv); in uhci_unlink_urb_sync()
1199 qh = list_entry (urb_priv->desc_list.next, uhci_desc_t, desc_list); in uhci_unlink_urb_sync()
1237 urb_priv_t *urb_priv; in uhci_cleanup_unlink() local
1246 urb_priv = (urb_priv_t*)urb->hcpriv; in uhci_cleanup_unlink()
1249 if (!urb_priv) // avoid crash when URB is corrupted in uhci_cleanup_unlink()
1252 if (force || ((urb_priv->started != ~0) && (urb_priv->started != now))) { in uhci_cleanup_unlink()
1278 urb_priv = urb->hcpriv; in uhci_cleanup_unlink()
1281 uhci_urb_dma_sync(s, urb, urb_priv); in uhci_cleanup_unlink()
1295 uhci_clean_iso_step2(s, urb_priv); in uhci_cleanup_unlink()
1299 uhci_urb_dma_unmap(s, urb, urb_priv); in uhci_cleanup_unlink()
1303 kmem_cache_free (urb_priv_kmem, urb_priv); in uhci_cleanup_unlink()
1305 kfree (urb_priv); in uhci_cleanup_unlink()
1441 urb_priv_t *urb_priv = urb->hcpriv; in uhci_submit_int_urb() local
1486 fill_td (td, status, info, urb_priv->transfer_buffer_dma); in uhci_submit_int_urb()
1487 list_add_tail (&td->desc_list, &urb_priv->desc_list); in uhci_submit_int_urb()
1501 urb_priv_t *urb_priv = urb->hcpriv; in uhci_submit_iso_urb() local
1574 urb_priv->transfer_buffer_dma + urb->iso_frame_desc[n].offset); in uhci_submit_iso_urb()
1575 list_add_tail (&td->desc_list, &urb_priv->desc_list); in uhci_submit_iso_urb()
1618 urb_priv_t *urb_priv; in uhci_submit_urb() local
1670 urb_priv = kmem_cache_alloc(urb_priv_kmem, SLAB_FLAG); in uhci_submit_urb()
1672 urb_priv = kmalloc (sizeof (urb_priv_t), KMALLOC_FLAG); in uhci_submit_urb()
1674 if (!urb_priv) { in uhci_submit_urb()
1680 memset(urb_priv, 0, sizeof(urb_priv_t)); in uhci_submit_urb()
1681 urb->hcpriv = urb_priv; in uhci_submit_urb()
1682 INIT_LIST_HEAD (&urb_priv->desc_list); in uhci_submit_urb()
1687 urb_priv->setup_packet_dma = pci_map_single(s->uhci_pci, urb->setup_packet, in uhci_submit_urb()
1691 urb_priv->transfer_buffer_dma = pci_map_single(s->uhci_pci, in uhci_submit_urb()
1758 uhci_urb_dma_unmap(s, urb, urb_priv); in uhci_submit_urb()
1761 kmem_cache_free(urb_priv_kmem, urb_priv); in uhci_submit_urb()
1763 kfree (urb_priv); in uhci_submit_urb()
2315 urb_priv_t *urb_priv = urb->hcpriv; in process_transfer() local
2316 struct list_head *qhl = urb_priv->desc_list.next; in process_transfer()
2319 uhci_desc_t *desc= list_entry (urb_priv->desc_list.prev, uhci_desc_t, desc_list); in process_transfer()
2333 if (urb_priv->flags && in process_transfer()
2381 urb_priv->flags = 1; // mark as short control packet in process_transfer()
2434 urb_priv_t *urb_priv = urb->hcpriv; in process_interrupt() local
2436 uhci_desc_t *desc = list_entry (urb_priv->desc_list.prev, uhci_desc_t, desc_list); in process_interrupt()
2444 while ((p = urb_priv->desc_list.next) != &urb_priv->desc_list) { in process_interrupt()
2518 uhci_clean_iso_step2(s, urb_priv); in process_interrupt()
2536 urb_priv_t *urb_priv = urb->hcpriv; in process_iso() local
2537 struct list_head *p = urb_priv->desc_list.next, *p_tmp; in process_iso()
2538 uhci_desc_t *desc = list_entry (urb_priv->desc_list.prev, uhci_desc_t, desc_list); in process_iso()
2550 for (i = 0; p != &urb_priv->desc_list; i++) { in process_iso()
2625 urb_priv_t *urb_priv; in process_urb() local
2641 urb_priv = urb->hcpriv; in process_urb()
2643 uhci_urb_dma_unmap(s, urb, urb_priv); in process_urb()
2646 kmem_cache_free(urb_priv_kmem, urb_priv); in process_urb()
2648 kfree (urb_priv); in process_urb()