Lines Matching refs:ring

81 static void xhci_ring_free(struct xhci_ring *ring)  in xhci_ring_free()  argument
86 BUG_ON(!ring); in xhci_ring_free()
88 first_seg = ring->first_seg; in xhci_ring_free()
97 free(ring); in xhci_ring_free()
155 if (virt_dev->eps[i].ring) in xhci_free_virt_devices()
156 xhci_ring_free(virt_dev->eps[i].ring); in xhci_free_virt_devices()
250 static void xhci_initialize_ring_info(struct xhci_ring *ring) in xhci_initialize_ring_info() argument
255 ring->enqueue = ring->first_seg->trbs; in xhci_initialize_ring_info()
256 ring->enq_seg = ring->first_seg; in xhci_initialize_ring_info()
257 ring->dequeue = ring->enqueue; in xhci_initialize_ring_info()
258 ring->deq_seg = ring->first_seg; in xhci_initialize_ring_info()
266 ring->cycle_state = 1; in xhci_initialize_ring_info()
310 struct xhci_ring *ring; in xhci_ring_alloc() local
313 ring = malloc(sizeof(struct xhci_ring)); in xhci_ring_alloc()
314 BUG_ON(!ring); in xhci_ring_alloc()
317 return ring; in xhci_ring_alloc()
319 ring->first_seg = xhci_segment_alloc(); in xhci_ring_alloc()
320 BUG_ON(!ring->first_seg); in xhci_ring_alloc()
324 prev = ring->first_seg; in xhci_ring_alloc()
336 xhci_link_segments(ctrl, prev, ring->first_seg, link_trbs); in xhci_ring_alloc()
342 xhci_initialize_ring_info(ring); in xhci_ring_alloc()
344 return ring; in xhci_ring_alloc()
490 virt_dev->eps[0].ring = xhci_ring_alloc(ctrl, 1, true); in xhci_alloc_virt_device()
854 trb_64 = xhci_virt_to_bus(ctrl, virt_dev->eps[0].ring->first_seg->trbs); in xhci_setup_addressable_virt_dev()
855 ep0_ctx->deq = cpu_to_le64(trb_64 | virt_dev->eps[0].ring->cycle_state); in xhci_setup_addressable_virt_dev()