Changeset c9467b0 in mainline
- Timestamp:
- 2013-01-07T17:30:03Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a5a470c
- Parents:
- e6becb9
- Location:
- uspace/drv/bus/usb/usbhub
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
re6becb9 rc9467b0 66 66 { 67 67 assert(port); 68 if (port->attached_ device.fun)68 if (port->attached_handle != USB_DEVICE_HANDLE_INVALID) 69 69 return usb_hub_port_device_gone(port, hub); 70 70 return EOK; … … 471 471 } 472 472 473 usb_log_fatal("reserving default address\n");474 475 473 /* Reserve default address */ 476 474 int ret; 477 475 while ((ret = usb_reserve_default_address(exch, speed)) == ENOENT) { 478 usb_log_fatal("reserving default address %d\n", ret);479 476 async_usleep(1000000); 480 477 } … … 507 504 "Failed to release default address\n"); 508 505 } 506 } else { 507 if (usb_release_default_address(exch) != EOK) 508 usb_log_warning("Failed to release default address\n"); 509 509 } 510 510 async_exchange_end(exch); 511 512 fibril_mutex_lock(&hub->pending_ops_mutex); 513 assert(hub->pending_ops_count > 0); 514 --hub->pending_ops_count; 515 fibril_condvar_signal(&hub->pending_ops_cv); 516 fibril_mutex_unlock(&hub->pending_ops_mutex); 517 511 518 return ret; 512 519 #if 0 -
uspace/drv/bus/usb/usbhub/port.h
re6becb9 rc9467b0 61 61 usb_device_handle_t attached_handle; 62 62 63 /** Information about attached device. */64 usb_hub_attached_device_t attached_device;65 63 } usb_hub_port_t; 66 64 … … 73 71 { 74 72 assert(port); 75 port->attached_device.address = -1;76 port->attached_device.fun = NULL;77 73 port->port_number = port_number; 78 74 port->control_pipe = control_pipe; -
uspace/drv/bus/usb/usbhub/usbhub.c
re6becb9 rc9467b0 200 200 201 201 for (size_t port = 0; port < hub->port_count; ++port) { 202 if (hub->ports[port].attached_device.fun) { 203 const int ret = 204 usb_hub_port_fini(&hub->ports[port], hub); 205 if (ret != EOK) 206 return ret; 207 } 202 const int ret = usb_hub_port_fini(&hub->ports[port], hub); 203 if (ret != EOK) 204 return ret; 208 205 } 209 206 free(hub->ports);
Note:
See TracChangeset
for help on using the changeset viewer.