Changeset dd143621 in mainline
- Timestamp:
- 2011-05-28T15:09:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a066122c, b59ec8c
- Parents:
- af6136d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.c
raf6136d rdd143621 487 487 488 488 fibril_mutex_lock(&hub->pending_ops_mutex); 489 490 /* The device is dead. However there might be some pending operations 491 * that we need to wait for. 492 * One of them is device adding in progress. 493 * The respective fibril is probably waiting for status change 494 * in port reset (port enable) callback. 495 * Such change would never come (otherwise we would not be here). 496 * Thus, we would flush all pending port resets. 497 */ 498 if (hub->pending_ops_count > 0) { 499 fibril_mutex_lock(&hub->port_mutex); 500 size_t port; 501 for (port = 0; port < hub->port_count; port++) { 502 usb_hub_port_t *the_port = hub->ports + port; 503 fibril_mutex_lock(&the_port->reset_mutex); 504 the_port->reset_completed = true; 505 the_port->reset_okay = false; 506 fibril_condvar_broadcast(&the_port->reset_cv); 507 fibril_mutex_unlock(&the_port->reset_mutex); 508 } 509 fibril_mutex_unlock(&hub->port_mutex); 510 } 511 /* And now wait for them. */ 489 512 while (hub->pending_ops_count > 0) { 490 513 fibril_condvar_wait(&hub->pending_ops_cv,
Note:
See TracChangeset
for help on using the changeset viewer.