Changeset 56db65d in mainline for uspace/drv/bus/usb/xhci/bus.c
- Timestamp:
- 2017-10-24T11:06:32Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0206d35
- Parents:
- 894f58c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/bus.c
r894f58c r56db65d 165 165 } 166 166 167 static int register_endpoint(bus_t *bus_base, endpoint_t *ep )167 static int register_endpoint(bus_t *bus_base, endpoint_t *ep, const usb_endpoint_desc_t *desc) 168 168 { 169 169 xhci_bus_t *bus = bus_to_xhci_bus(bus_base); 170 170 assert(bus); 171 171 172 usb_log_info("Endpoint(%d:%d) registered to XHCI bus.", ep->target.address, ep->target.endpoint); 172 assert(ep->device); 173 174 /* Extract USB2-related information from endpoint_desc */ 175 ep->target = (usb_target_t) {{ 176 .address = ep->device->address, 177 .endpoint = desc->endpoint_no, 178 }}; 179 ep->direction = desc->direction; 180 ep->transfer_type = desc->transfer_type; 181 ep->max_packet_size = desc->max_packet_size; 182 ep->packets = desc->packets; 173 183 174 184 xhci_device_t *xhci_dev = xhci_device_get(ep->device); 175 185 xhci_endpoint_t *xhci_ep = xhci_endpoint_get(ep); 186 187 xhci_ep->max_streams = desc->usb3.max_streams; 188 xhci_ep->max_burst = desc->usb3.max_burst; 189 // TODO add this property to usb_endpoint_desc_t and fetch it from ss companion desc 190 xhci_ep->mult = 0; 191 192 usb_log_info("Endpoint(%d:%d) registered to XHCI bus.", ep->target.address, ep->target.endpoint); 176 193 return xhci_device_add_endpoint(xhci_dev, xhci_ep); 177 194 }
Note:
See TracChangeset
for help on using the changeset viewer.