Changeset ef8d655 in mainline


Ignore:
Timestamp:
2011-01-28T14:52:55Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2b96463
Parents:
89beb08
Message:

More robust init of virtual root hub

The loop is necessary since this fibril could be executed before
the DRIVER_ADD_DEVICE returns to devman.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hub.c

    r89beb08 ref8d655  
    6363            = fibril_create(hub_register_in_devman_fibril, hc_dev);
    6464        if (root_hub_registration == 0) {
    65                 printf(NAME ": failed to register root hub\n");
     65                printf(NAME ": failed to create hub registration fibril\n");
    6666                return;
    6767        }
     
    7979        device_t *hc_dev = (device_t *) arg;
    8080
    81         int hc = usb_drv_hc_connect(hc_dev, hc_dev->handle, IPC_FLAG_BLOCKING);
    82         if (hc < 0) {
    83                 printf(NAME ": failed to register root hub\n");
    84                 return hc;
    85         }
     81        int hc;
     82        do {
     83                hc = usb_drv_hc_connect(hc_dev, hc_dev->handle,
     84                    IPC_FLAG_BLOCKING);
     85        } while (hc < 0);
    8686
    8787        usb_drv_reserve_default_address(hc);
Note: See TracChangeset for help on using the changeset viewer.