Changeset 867b375 in mainline for uspace/drv/bus/usb/vhc/main.c


Ignore:
Timestamp:
2017-10-15T02:04:10Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
20eaa82
Parents:
d7869d7e
Message:

hcd_ddf_new_device refactoring

This long function is now split into parts. Instead of passing dozens of arguments, it now creates the usb_dev_t right away, and uses that to pass it along. The address_device part is now modifiable by drivers.

There is still a work to be done. The biggest problem I see is in the addressing - currently, there is usb_address_t, and for high speed transaction translating there is another address. For (near) future extensibility, we should pass address as a structure. Or even better, make a way how to reference a device, maybe in a similar way how we work with endpoints.

File:
1 edited

Legend:

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

    rd7869d7e r867b375  
    111111         * needs to be ready at this time.
    112112         */
    113         ret = hcd_setup_virtual_root_hub(dev);
     113        ret = hcd_setup_virtual_root_hub(dev_to_hcd(dev), dev);
    114114        if (ret != EOK) {
    115115                usb_log_error("Failed to init VHC root hub: %s\n",
Note: See TracChangeset for help on using the changeset viewer.