Changeset 129b821f in mainline for uspace/drv/bus/usb/usbhub/port.c


Ignore:
Timestamp:
2018-01-20T12:34:50Z (6 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/port.c

    r60d3f35 r129b821f  
    8989}
    9090
     91
     92static usb_speed_t get_port_speed(usb_hub_port_t *port, uint32_t status)
     93{
     94        assert(port);
     95        assert(port->hub);
     96
     97        return usb_port_speed(port->hub->speed, status);
     98}
     99
    91100/**
    92101 * Routine for adding a new device.
     
    203212                // The connecting fibril do not touch speed until the port is enabled,
    204213                // so we do not have to lock
    205                 port->speed = usb_port_speed(status);
     214                port->speed = get_port_speed(port, status);
    206215                usb_port_enabled(&port->base);
    207216        } else
Note: See TracChangeset for help on using the changeset viewer.