Changeset c2245a3 in mainline for uspace/drv/bus/usb/usbhub/port.c
- Timestamp:
- 2011-11-10T20:03:48Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fa76f81
- Parents:
- 27ca3a3 (diff), 747ef72 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
r27ca3a3 rc2245a3 401 401 { 402 402 usb_hub_port_t *port = arg; 403 assert(port); 403 404 const int rc = 404 405 usb_hub_port_set_feature(port, USB_HUB_FEATURE_PORT_RESET); … … 440 441 data->port, &new_address, NULL, NULL, &child_fun); 441 442 442 if (rc != EOK) { 443 if (rc == EOK) { 444 fibril_mutex_lock(&data->port->mutex); 445 data->port->attached_device.fun = child_fun; 446 data->port->attached_device.address = new_address; 447 fibril_mutex_unlock(&data->port->mutex); 448 449 usb_log_info("Detected new device on `%s' (port %zu), " 450 "address %d (handle %" PRIun ").\n", 451 data->hub->usb_device->ddf_dev->name, 452 data->port->port_number, new_address, child_fun->handle); 453 } else { 443 454 usb_log_error("Failed registering device on port %zu: %s.\n", 444 455 data->port->port_number, str_error(rc)); 445 goto leave; 446 } 447 448 fibril_mutex_lock(&data->port->mutex); 449 data->port->attached_device.fun = child_fun; 450 data->port->attached_device.address = new_address; 451 fibril_mutex_unlock(&data->port->mutex); 452 453 usb_log_info("Detected new device on `%s' (port %zu), " 454 "address %d (handle %" PRIun ").\n", 455 data->hub->usb_device->ddf_dev->name, data->port->port_number, 456 new_address, child_fun->handle); 457 458 leave: 456 } 457 458 459 459 fibril_mutex_lock(&data->hub->pending_ops_mutex); 460 460 assert(data->hub->pending_ops_count > 0);
Note:
See TracChangeset
for help on using the changeset viewer.