Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset cb8ede1 in mainline


Ignore:
Timestamp:
2013-08-07T08:56:48Z (7 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
4b8ecff
Parents:
6340a6ff
Message:

usb: Root hub always communicates at max spped

and it can be queried internally.

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci.c

    r6340a6ff rcb8ede1  
    158158
    159159        /* HC should be running OK. We can add root hub */
    160         ret = hcd_ddf_setup_root_hub(device, USB_SPEED_FULL);
     160        ret = hcd_ddf_setup_root_hub(device);
    161161        CHECK_RET_CLEAN_RETURN(ret,
    162162            "Failed to register OHCI root hub: %s.\n", str_error(ret));
  • uspace/drv/bus/usb/uhci/uhci.c

    r6340a6ff rcb8ede1  
    150150
    151151        /*
    152          * Creating root hub registers a new USB device so all HC
    153          * functionality needs to be ready at this time.
     152         * Creating root hub registers a new USB device so HC
     153         * needs to be ready at this time.
    154154         */
    155         ret = hcd_ddf_setup_root_hub(device, USB_SPEED_FULL);
     155        ret = hcd_ddf_setup_root_hub(device);
    156156        if (ret != EOK) {
    157157                // TODO: Undo hcd_setup_device
  • uspace/drv/bus/usb/vhc/main.c

    r6340a6ff rcb8ede1  
    105105        }
    106106
    107         ret = hcd_ddf_setup_root_hub(dev, USB_SPEED_FULL);
     107        /*
     108         * Creating root hub registers a new USB device so HC
     109         * needs to be ready at this time.
     110         */
     111        ret = hcd_ddf_setup_root_hub(dev);
    108112        if (ret != EOK) {
    109113                usb_log_error("Failed to init VHC root hub: %s\n",
  • uspace/lib/usbhost/include/usb/host/ddf_helpers.h

    r6340a6ff rcb8ede1  
    4545int hcd_ddf_setup_device(ddf_dev_t *device, ddf_fun_t **hc_fun,
    4646    usb_speed_t max_speed, size_t bw, bw_count_func_t bw_count);
    47 int hcd_ddf_setup_root_hub(ddf_dev_t *dev, usb_speed_t speed);
     47int hcd_ddf_setup_root_hub(ddf_dev_t *device);
    4848int hcd_ddf_new_device(ddf_dev_t *device, usb_address_t *address);
    4949int hcd_ddf_remove_device(ddf_dev_t *device, usb_address_t address);
  • uspace/lib/usbhost/src/ddf_helpers.c

    r6340a6ff rcb8ede1  
    579579 *
    580580 * @param[in] device Host controller ddf device
    581  * @param[in] speed roothub communication speed
    582581 * @return Error code
    583582 */
    584 int hcd_ddf_setup_root_hub(ddf_dev_t *device, usb_speed_t speed)
     583int hcd_ddf_setup_root_hub(ddf_dev_t *device)
    585584{
    586585        assert(device);
    587586        hcd_t *hcd = dev_to_hcd(device);
    588587        assert(hcd);
     588
     589        const usb_speed_t speed = hcd->ep_manager.max_speed;
    589590
    590591        hcd_reserve_default_address(hcd, speed);
Note: See TracChangeset for help on using the changeset viewer.