Changeset ae3a941 in mainline for uspace/drv/bus/usb/xhci/trb_ring.h
- Timestamp:
- 2018-02-26T16:51:40Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e773f58
- Parents:
- 3692678
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/trb_ring.h
r3692678 rae3a941 57 57 */ 58 58 typedef struct xhci_trb_ring { 59 list_t segments; /* List of assigned segments */60 int segment_count; /* Number of segments assigned */59 list_t segments; /**< List of assigned segments */ 60 int segment_count; /**< Number of segments assigned */ 61 61 62 /* 63 * As the link TRBs connect physical addresses, we need to keep track of64 * active segment in virtual memory. The enqueue ptr should always belong65 * to the enqueue segment.62 /** 63 * As the link TRBs connect physical addresses, we need to keep track 64 * of active segment in virtual memory. The enqueue ptr should always 65 * belong to the enqueue segment. 66 66 */ 67 67 trb_segment_t *enqueue_segment; 68 68 xhci_trb_t *enqueue_trb; 69 69 70 uintptr_t dequeue; /*Last reported position of the dequeue pointer */71 bool pcs; /*Producer Cycle State: section 4.9.2 */70 uintptr_t dequeue; /**< Last reported position of the dequeue pointer */ 71 bool pcs; /**< Producer Cycle State: section 4.9.2 */ 72 72 73 73 fibril_mutex_t guard; … … 76 76 extern errno_t xhci_trb_ring_init(xhci_trb_ring_t *, size_t); 77 77 extern void xhci_trb_ring_fini(xhci_trb_ring_t *); 78 extern errno_t xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *, uintptr_t *); 79 extern errno_t xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *, size_t, uintptr_t *); 78 extern errno_t xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *, 79 uintptr_t *); 80 extern errno_t xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *, 81 size_t, uintptr_t *); 80 82 extern size_t xhci_trb_ring_size(xhci_trb_ring_t *); 81 83 82 extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t * ring, uintptr_t *addr);84 extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *, uintptr_t *); 83 85 84 86 /** … … 86 88 * pointer inside the ring. Otherwise, the ring will soon show up as full. 87 89 */ 88 static inline void xhci_trb_ring_update_dequeue(xhci_trb_ring_t *ring, uintptr_t phys) 90 static inline void xhci_trb_ring_update_dequeue(xhci_trb_ring_t *ring, 91 uintptr_t phys) 89 92 { 90 93 ring->dequeue = phys; … … 95 98 */ 96 99 typedef struct xhci_event_ring { 97 list_t segments; /* List of assigned segments */98 int segment_count; /* Number of segments assigned */100 list_t segments; /**< List of assigned segments */ 101 int segment_count; /**< Number of segments assigned */ 99 102 100 trb_segment_t *dequeue_segment; /* Current segment of the dequeue ptr*/101 xhci_trb_t *dequeue_trb; /* Next TRB to be processed */102 uintptr_t dequeue_ptr; /* Physical address of theERDP to be reported to the HC */103 trb_segment_t *dequeue_segment; /**< Current segment */ 104 xhci_trb_t *dequeue_trb; /**< Next TRB to be processed */ 105 uintptr_t dequeue_ptr; /**< Physical ERDP to be reported to the HC */ 103 106 104 dma_buffer_t erst; /*ERST given to the HC */107 dma_buffer_t erst; /**< ERST given to the HC */ 105 108 106 bool ccs; /*Consumer Cycle State: section 4.9.2 */109 bool ccs; /**< Consumer Cycle State: section 4.9.2 */ 107 110 108 111 fibril_mutex_t guard;
Note:
See TracChangeset
for help on using the changeset viewer.