Changeset 45e9cc6 in mainline for uspace/lib/usb/src/hcdhubd.c


Ignore:
Timestamp:
2010-12-04T20:37:19Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b5ec347
Parents:
4144630 (diff), 35537a7 (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.
Message:

merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/hcdhubd.c

    r4144630 r45e9cc6  
    5151 */
    5252static int add_device(device_t *dev) {
    53         bool is_hc = str_cmp(dev->name, USB_HUB_DEVICE_NAME) != 0;
    54         printf("%s: add_device(name=\"%s\")\n", hc_driver->name, dev->name);
    55 
    56         if (is_hc) {
    57                 /*
    58                  * We are the HC itself.
    59                  */
    60                 return usb_add_hc_device(dev);
    61         } else {
    62                 /*
    63                  * We are some (maybe deeply nested) hub.
    64                  * Thus, assign our own operations and explore already
    65                  * connected devices.
    66                  */
    67                 return usb_add_hub_device(dev);
    68         }
     53        return ENOTSUP;
    6954}
    7055
     
    10590 * @return Error code.
    10691 */
    107 int usb_hcd_add_root_hub(usb_hc_device_t *dev) {
     92int usb_hcd_add_root_hub(device_t *dev)
     93{
    10894        char *id;
    109         int rc = asprintf(&id, "usb&hc=%s&hub", dev->generic->name);
     95        int rc = asprintf(&id, "usb&hub");
    11096        if (rc <= 0) {
    11197                return rc;
    11298        }
    11399
    114         rc = usb_hc_add_child_device(dev->generic, USB_HUB_DEVICE_NAME, id, true);
     100        rc = usb_hc_add_child_device(dev, USB_HUB_DEVICE_NAME, id, true);
    115101        if (rc != EOK) {
    116102                free(id);
     
    133119        int rc;
    134120
     121        async_usleep(1000);
     122
    135123        device_t *child = create_device();
    136124        match_id_t *match_id = NULL;
     
    196184        printf("%s: about to add child device `%s' (%s)\n", hc_driver->name,
    197185                        name, match_id);
     186
     187        /*
     188         * Seems that creating fibril which postpones the action
     189         * is the best solution.
     190         */
     191        create_fibril = true;
    198192
    199193        struct child_device_info *child_info
Note: See TracChangeset for help on using the changeset viewer.