Changeset 398a94c in mainline
- Timestamp:
- 2018-01-10T13:32:21Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8bab0d2
- Parents:
- 4a00bc9
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-10 13:32:19)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-10 13:32:21)
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/endpoint.c
r4a00bc9 r398a94c 65 65 endpoint_init(ep, dev, desc); 66 66 67 xhci_ep->max_streams = 1 << (USB_SSC_MAX_STREAMS(desc->companion));68 67 xhci_ep->max_burst = desc->companion.max_burst + 1; 69 xhci_ep->mult = USB_SSC_MULT(desc->companion) + 1; 68 69 if (ep->transfer_type == USB_TRANSFER_BULK) 70 xhci_ep->max_streams = 1 << (USB_SSC_MAX_STREAMS(desc->companion)); 71 else 72 xhci_ep->max_streams = 1; 73 74 if (ep->transfer_type == USB_TRANSFER_ISOCHRONOUS) 75 xhci_ep->mult = USB_SSC_MULT(desc->companion) + 1; 76 else 77 xhci_ep->mult = 1; 70 78 71 79 /* In USB 3, the semantics of wMaxPacketSize changed. Now the number of … … 314 322 } 315 323 316 isoch_fini(xhci_ep); 324 if (xhci_ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) 325 isoch_fini(xhci_ep); 317 326 } 318 327 -
uspace/drv/bus/usb/xhci/isoch.c
r4a00bc9 r398a94c 54 54 fibril_condvar_initialize(&isoch->avail); 55 55 56 isoch->max_size = desc->companion.bytes_per_interval57 ? desc->companion.bytes_per_interval58 : ep->base.max_transfer_size;59 60 56 const xhci_hc_t *hc = bus_to_xhci_bus(ep->base.device->bus)->hc; 61 57 … … 122 118 for (size_t i = 0; i < isoch->buffer_count; ++i) { 123 119 xhci_isoch_transfer_t *transfer = &isoch->transfers[i]; 124 if (dma_buffer_alloc(&transfer->data, isoch->max_size)) {120 if (dma_buffer_alloc(&transfer->data, ep->base.max_transfer_size)) { 125 121 goto err; 126 122 } … … 276 272 fibril_timer_set_locked(isoch->feeding_timer, delay, 277 273 isoch_feed_out_timer, ep); 278 break;274 goto out; 279 275 } 280 276 … … 305 301 } 306 302 } 303 out: 307 304 308 305 if (fed) { … … 345 342 /* IN buffers are "filled" with free space */ 346 343 if (it->state == ISOCH_EMPTY) { 347 it->size = isoch->max_size;344 it->size = ep->base.max_transfer_size; 348 345 it->state = ISOCH_FILLED; 349 346 calc_next_mfindex(ep, it); … … 361 358 fibril_timer_set_locked(isoch->feeding_timer, delay, 362 359 isoch_feed_in_timer, ep); 363 break;360 goto out; 364 361 } 365 362 … … 391 388 } 392 389 } 390 out: 393 391 394 392 if (fed) { … … 422 420 xhci_isoch_t * const isoch = ep->isoch; 423 421 424 if (transfer->batch.buffer_size > isoch->max_size) {422 if (transfer->batch.buffer_size > ep->base.max_transfer_size) { 425 423 usb_log_error("Cannot schedule an oversized isochronous transfer."); 426 424 return ELIMIT; … … 487 485 xhci_isoch_t * const isoch = ep->isoch; 488 486 489 if (transfer->batch.buffer_size < isoch->max_size) {487 if (transfer->batch.buffer_size < ep->base.max_transfer_size) { 490 488 usb_log_error("Cannot schedule an undersized isochronous transfer."); 491 489 return ELIMIT; -
uspace/drv/bus/usb/xhci/main.c
r4a00bc9 r398a94c 115 115 { 116 116 log_init(NAME); 117 logctl_set_log_level(NAME, LVL_ NOTE);117 logctl_set_log_level(NAME, LVL_DEBUG); 118 118 return hc_driver_main(&xhci_driver); 119 119 }
Note:
See TracChangeset
for help on using the changeset viewer.