Changeset 21885c92 in mainline for uspace/lib/usbhost/src/utility.c


Ignore:
Timestamp:
2018-01-20T18:27:53Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24fcb8b
Parents:
2aaba7e
Message:

usbhost: handle superspeed hubs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/utility.c

    r2aaba7e r21885c92  
    150150        }};
    151151
     152        const usb_descriptor_type_t type = device->speed >= USB_SPEED_SUPER
     153                ? USB_DESCTYPE_SSPEED_HUB : USB_DESCTYPE_HUB;
     154
    152155        const usb_device_request_setup_packet_t get_hub_desc = {
    153156                .request_type = SETUP_REQUEST_TYPE_DEVICE_TO_HOST
     
    155158                    | USB_REQUEST_RECIPIENT_DEVICE,
    156159                .request = USB_DEVREQ_GET_DESCRIPTOR, \
    157                 .value = uint16_host2usb(USB_DESCTYPE_HUB << 8), \
     160                .value = uint16_host2usb(type << 8), \
    158161                .length = sizeof(*desc),
    159162        };
Note: See TracChangeset for help on using the changeset viewer.