Changeset 17c5e62 in mainline for uspace/drv/bus/usb/xhci/endpoint.c
- Timestamp:
- 2018-01-08T22:30:12Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0eadfd1e
- Parents:
- bdd8842c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/endpoint.c
rbdd8842c r17c5e62 89 89 90 90 if (xhci_ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) { 91 xhci_ep->isoch _max_size = desc->companion.bytes_per_interval91 xhci_ep->isoch->max_size = desc->companion.bytes_per_interval 92 92 ? desc->companion.bytes_per_interval 93 93 : ep->max_transfer_size; … … 95 95 96 96 /* Allocate and setup isochronous-specific structures. */ 97 xhci_ep->isoch _enqueue = 0;98 xhci_ep->isoch _dequeue = 0;99 xhci_ep->isoch _started = false;100 101 fibril_mutex_initialize(&xhci_ep->isoch _guard);102 fibril_condvar_initialize(&xhci_ep->isoch _avail);97 xhci_ep->isoch->enqueue = 0; 98 xhci_ep->isoch->dequeue = 0; 99 xhci_ep->isoch->started = false; 100 101 fibril_mutex_initialize(&xhci_ep->isoch->guard); 102 fibril_condvar_initialize(&xhci_ep->isoch->avail); 103 103 } 104 104 … … 266 266 int err = EOK; 267 267 while (i < XHCI_ISOCH_BUFFER_COUNT) { 268 xhci_isoch_transfer_t *transfer = &xhci_ep->isoch _transfers[i];269 if (dma_buffer_alloc(&transfer->data, xhci_ep->isoch _max_size)) {268 xhci_isoch_transfer_t *transfer = &xhci_ep->isoch->transfers[i]; 269 if (dma_buffer_alloc(&transfer->data, xhci_ep->isoch->max_size)) { 270 270 err = ENOMEM; 271 271 break; … … 278 278 --i; 279 279 while(i >= 0) { 280 dma_buffer_free(&xhci_ep->isoch _transfers[i].data);280 dma_buffer_free(&xhci_ep->isoch->transfers[i].data); 281 281 --i; 282 282 } … … 342 342 if (xhci_ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) { 343 343 for (size_t i = 0; i < XHCI_ISOCH_BUFFER_COUNT; ++i) { 344 dma_buffer_free(&xhci_ep->isoch _transfers[i].data);344 dma_buffer_free(&xhci_ep->isoch->transfers[i].data); 345 345 } 346 346 } … … 417 417 XHCI_EP_INTERVAL_SET(*ctx, fnzb32(ep->interval) % 32 - 1); 418 418 419 XHCI_EP_MAX_ESIT_PAYLOAD_LO_SET(*ctx, ep->isoch _max_size & 0xFFFF);420 XHCI_EP_MAX_ESIT_PAYLOAD_HI_SET(*ctx, (ep->isoch _max_size >> 16) & 0xFF);419 XHCI_EP_MAX_ESIT_PAYLOAD_LO_SET(*ctx, ep->isoch->max_size & 0xFFFF); 420 XHCI_EP_MAX_ESIT_PAYLOAD_HI_SET(*ctx, (ep->isoch->max_size >> 16) & 0xFF); 421 421 } 422 422
Note:
See TracChangeset
for help on using the changeset viewer.