Changeset 6832245 in mainline for uspace/drv/bus/usb/xhci/endpoint.c
- Timestamp:
- 2017-12-14T23:01:57Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 837d53d
- Parents:
- bd05140
- git-author:
- Ondřej Hlavatý <aearsis@…> (2017-12-14 23:01:54)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2017-12-14 23:01:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/endpoint.c
rbd05140 r6832245 45 45 #include "endpoint.h" 46 46 47 int xhci_endpoint_init(xhci_endpoint_t *xhci_ep, xhci_bus_t *xhci_bus)47 int xhci_endpoint_init(xhci_endpoint_t *xhci_ep, device_t *dev, const usb_endpoint_desc_t *desc) 48 48 { 49 49 assert(xhci_ep); 50 assert(xhci_bus); 51 52 bus_t *bus = &xhci_bus->base; 50 53 51 endpoint_t *ep = &xhci_ep->base; 54 52 55 endpoint_init(ep, bus); 53 endpoint_init(ep, dev, desc); 54 55 xhci_ep->max_streams = desc->usb3.max_streams; 56 xhci_ep->max_burst = desc->usb3.max_burst; 57 xhci_ep->mult = desc->usb3.mult; 58 59 if (xhci_ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) { 60 xhci_ep->isoch_max_size = desc->usb3.bytes_per_interval 61 ? desc->usb3.bytes_per_interval 62 : desc->max_packet_size * (desc->packets + 1); 63 /* Technically there could be superspeed plus too. */ 64 65 /* Allocate and setup isochronous-specific structures. */ 66 xhci_ep->isoch_enqueue = 0; 67 xhci_ep->isoch_dequeue = XHCI_ISOCH_BUFFER_COUNT - 1; 68 xhci_ep->isoch_started = false; 69 70 fibril_mutex_initialize(&xhci_ep->isoch_guard); 71 fibril_condvar_initialize(&xhci_ep->isoch_avail); 72 } 56 73 57 74 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.