Changeset 0e97b4b5 in mainline


Ignore:
Timestamp:
2013-01-04T16:51:11Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ceb444c
Parents:
237df2f
Message:

vhc: Switch to new roothub initialization.

Remove device address hack.
Fix few bugs in error paths.

Location:
uspace/drv/bus/usb/vhc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/hub/virthub.c

    r237df2f r0e97b4b5  
    155155        dev->address = 0;
    156156        dev->name = str_dup(name);
    157         if (!name)
     157        if (!dev->name)
    158158                return ENOMEM;
    159159
  • uspace/drv/bus/usb/vhc/main.c

    r237df2f r0e97b4b5  
    5151};
    5252
    53 
    5453static int vhc_control_node(ddf_dev_t *dev, ddf_fun_t **fun)
    5554{
     
    9392                usb_log_error("Failed to init HCD structures: %s.\n",
    9493                   str_error(ret));
    95                 free(data);
     94                ddf_fun_destroy(ctl_fun);
    9695                return ret;
    9796        }
     
    10099
    101100        /* Add virtual hub device */
    102         usb_address_t address = 1;
    103         ret = vhc_virtdev_plug_hub(data, &data->hub, NULL, address);
     101        ret = vhc_virtdev_plug_hub(data, &data->hub, NULL, 0);
    104102        if (ret != EOK) {
    105103                usb_log_error("Failed to plug root hub: %s.\n", str_error(ret));
    106                 free(data);
     104                ddf_fun_destroy(ctl_fun);
    107105                return ret;
    108106        }
    109107
    110         // TODO fix the address hack
    111         ret = hcd_ddf_setup_hub(dev, &address);
     108        ret = hcd_ddf_setup_root_hub(dev, USB_SPEED_FULL);
    112109        if (ret != EOK) {
    113110                usb_log_error("Failed to init VHC root hub: %s\n",
Note: See TracChangeset for help on using the changeset viewer.