Changeset 370a1c8 in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2017-10-02T16:10:28Z (8 years ago)
Author:
Michal Staruch <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04df063
Parents:
4688350b
Message:

Extcap fix, not correctly determine if port is USB 2/3

File:
1 edited

Legend:

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

    r4688350b r370a1c8  
    8383                                 * == 0.
    8484                                 */
     85
     86                                unsigned ports_from = XHCI_REG_RD(ec, XHCI_EC_SP_CP_OFF);
     87                                unsigned ports_to = ports_from
     88                                        + XHCI_REG_RD(ec, XHCI_EC_SP_CP_COUNT) - 1;
     89
    8590                                if (major == 2) {
    8691                                        hc->speeds[1] = ps_default_full;
    8792                                        hc->speeds[2] = ps_default_low;
    8893                                        hc->speeds[3] = ps_default_high;
     94                                        hc->rh.usb2_port_start = ports_from;
     95                                        hc->rh.usb2_port_end = ports_to;
    8996                                } else if (major == 3) {
    9097                                        hc->speeds[4] = ps_default_super;
     98                                        hc->rh.usb3_port_start = ports_from;
     99                                        hc->rh.usb3_port_end = ports_to;
    91100                                } else {
    92101                                        return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.