Changeset 8033f89 in mainline for uspace/drv/bus/usb/xhci/trb_ring.c
- Timestamp:
- 2018-01-23T12:41:22Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7e1fd3
- Parents:
- e546142
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/trb_ring.c
re546142 r8033f89 156 156 157 157 list_foreach_safe(ring->segments, cur, next) { 158 trb_segment_t *segment = list_get_instance(cur, trb_segment_t, segments_link); 158 trb_segment_t *segment = 159 list_get_instance(cur, trb_segment_t, segments_link); 159 160 trb_segment_free(segment); 160 161 } … … 171 172 static void trb_ring_resolve_link(xhci_trb_ring_t *ring) 172 173 { 173 link_t *next_segment = list_next(&ring->enqueue_segment->segments_link, &ring->segments); 174 link_t *next_segment = 175 list_next(&ring->enqueue_segment->segments_link, &ring->segments); 174 176 if (!next_segment) 175 177 next_segment = list_first(&ring->segments); 176 178 assert(next_segment); 177 179 178 ring->enqueue_segment = list_get_instance(next_segment, trb_segment_t, segments_link); 180 ring->enqueue_segment = 181 list_get_instance(next_segment, trb_segment_t, segments_link); 179 182 ring->enqueue_trb = segment_begin(ring->enqueue_segment); 180 183 } … … 206 209 * The copied TRBs must be contiguous in memory, and must not contain Link TRBs. 207 210 * 208 * We cannot avoid the copying, because the TRB in ring should be updated atomically. 211 * We cannot avoid the copying, because the TRB in ring should be updated 212 * atomically. 209 213 * 210 214 * @param first_trb the first TRB … … 405 409 /* Wrapping around segment boundary */ 406 410 if (index >= SEGMENT_TRB_COUNT) { 407 link_t *next_segment = list_next(&ring->dequeue_segment->segments_link, &ring->segments); 411 link_t *next_segment = 412 list_next(&ring->dequeue_segment->segments_link, &ring->segments); 408 413 409 414 /* Wrapping around table boundary */ … … 413 418 } 414 419 415 ring->dequeue_segment = list_get_instance(next_segment, trb_segment_t, segments_link); 420 ring->dequeue_segment = 421 list_get_instance(next_segment, trb_segment_t, segments_link); 416 422 ring->dequeue_trb = segment_begin(ring->dequeue_segment); 417 423 }
Note:
See TracChangeset
for help on using the changeset viewer.