Changeset 53db806 in mainline
- Timestamp:
- 2017-12-10T22:42:44Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7d957b2
- Parents:
- 889146e
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/bus.c
r889146e r53db806 180 180 } 181 181 182 fibril_mutex_lock(&bus->base.guard);183 182 /* Assign an address to the device */ 184 183 if ((err = address_device(hc, xhci_dev))) { … … 187 186 } 188 187 188 /* Setup EP0 might already need to issue a transfer. */ 189 fibril_mutex_lock(&bus->base.guard); 190 assert(bus->devices_by_slot[xhci_dev->slot_id] == NULL); 191 bus->devices_by_slot[xhci_dev->slot_id] = xhci_dev; 192 fibril_mutex_unlock(&bus->base.guard); 193 189 194 if ((err = setup_ep0_packet_size(hc, xhci_dev))) { 190 195 usb_log_error("Failed to setup control endpoint of the new device: %s", str_error(err)); 191 196 goto err_address; 192 197 } 193 194 assert(bus->devices_by_slot[xhci_dev->slot_id] == NULL);195 bus->devices_by_slot[xhci_dev->slot_id] = xhci_dev;196 fibril_mutex_unlock(&bus->base.guard);197 198 198 199 /* Read the device descriptor, derive the match ids */ -
uspace/lib/usbhost/src/bus.c
r889146e r53db806 131 131 assert(device); 132 132 133 fibril_mutex_lock(&bus->guard);134 135 133 if (desc->max_packet_size == 0 || desc->packets == 0) { 136 134 usb_log_warning("Invalid endpoint description (mps %zu, %u packets)", desc->max_packet_size, desc->packets); 137 135 return EINVAL; 138 136 } 137 138 fibril_mutex_lock(&bus->guard); 139 139 140 140 int err = ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.