Changeset eeca8a6 in mainline for uspace/drv/bus/usb
- Timestamp:
- 2018-01-16T19:22:58Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4603b35
- Parents:
- 47e9494
- Location:
- uspace/drv/bus/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
r47e9494 reeca8a6 246 246 * TODO: Make the request synchronous. 247 247 */ 248 while ((err = usbhc_reserve_default_address(exch , port->speed)) == EAGAIN) {248 while ((err = usbhc_reserve_default_address(exch)) == EAGAIN) { 249 249 fibril_condvar_wait_timeout(&port->state_cv, &port->guard, 500000); 250 250 if (port->state != PORT_CONNECTED) { … … 271 271 port_log(debug, port, "Port reset, enumerating device."); 272 272 273 if ((err = usbhc_device_enumerate(exch, port->port_number ))) {273 if ((err = usbhc_device_enumerate(exch, port->port_number, port->speed))) { 274 274 port_log(error, port, "Failed to enumerate device: %s", str_error(err)); 275 275 port_change_state(port, PORT_DISABLED); -
uspace/drv/bus/usb/xhci/rh.c
r47e9494 reeca8a6 169 169 } 170 170 171 device_t *dev = hcd_ddf_fun_create(&rh->hc->base); 171 const xhci_port_speed_t *port_speed = xhci_rh_get_port_speed(rh, port_id); 172 173 device_t *dev = hcd_ddf_fun_create(&rh->hc->base, port_speed->usb_speed); 172 174 if (!dev) { 173 175 usb_log_error("Failed to create USB device function."); … … 175 177 } 176 178 177 const xhci_port_speed_t *port_speed = xhci_rh_get_port_speed(rh, port_id); 179 dev->hub = &rh->device.base; 180 dev->port = port_id; 181 178 182 xhci_device_t *xhci_dev = xhci_device_get(dev); 179 183 xhci_dev->usb3 = port_speed->major == 3; 180 184 xhci_dev->rh_port = port_id; 181 182 dev->hub = &rh->device.base;183 dev->port = port_id;184 dev->speed = port_speed->usb_speed;185 185 186 186 if ((err = bus_device_enumerate(dev))) {
Note:
See TracChangeset
for help on using the changeset viewer.