Changeset 129b821f in mainline for uspace/drv/bus/usb/uhci


Ignore:
Timestamp:
2018-01-20T12:34:50Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
682c9354
Parents:
60d3f35
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-20 12:33:42)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-20 12:34:50)
Message:

usbhub: be aware of its own speed

This resulted in a bunch of changes just because the roothubs in older
HC's are virtual, and need to be aware of their own speed too.

Location:
uspace/drv/bus/usb/uhci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    r60d3f35 r129b821f  
    5151#include <usb/host/utils/malloc32.h>
    5252#include <usb/host/bandwidth.h>
     53#include <usb/host/utility.h>
    5354
    5455#include "uhci_batch.h"
     
    258259}
    259260
     261int hc_setup_roothub(hc_device_t *hcd)
     262{
     263        return hc_setup_virtual_root_hub(hcd, USB_SPEED_FULL);
     264}
     265
    260266/** Safely dispose host controller internal structures
    261267 *
     
    330336
    331337        // Check for the roothub, as it does not schedule into lists
    332         if (ep->device->speed == USB_SPEED_MAX) {
     338        if (ep->device->address == uhci_rh_get_address(&hc->rh)) {
    333339                // FIXME: We shall check the roothub for active transfer. But
    334340                // as it is polling, there is no way to make it stop doing so.
  • uspace/drv/bus/usb/uhci/hc.h

    r60d3f35 r129b821f  
    150150extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *);
    151151extern int hc_start(hc_device_t *);
     152extern int hc_setup_roothub(hc_device_t *);
    152153extern int hc_gone(hc_device_t *);
    153154
  • uspace/drv/bus/usb/uhci/main.c

    r60d3f35 r129b821f  
    5858        .hc_add = hc_add,
    5959        .start = hc_start,
    60         .setup_root_hub = hc_setup_virtual_root_hub,
     60        .setup_root_hub = hc_setup_roothub,
    6161        .hc_gone = hc_gone,
    6262};
Note: See TracChangeset for help on using the changeset viewer.