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

Changeset d07b052 in mainline


Ignore:
Timestamp:
2017-10-03T19:59:59Z (4 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master
Children:
d14ca59
Parents:
65e079b
Message:

Setting root hub header upon init.

File:
1 edited

Legend:

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

    r65e079b rd07b052  
    5353int xhci_rh_init(xhci_rh_t *rh)
    5454{
     55        usb_hub_descriptor_header_t *header = &rh->hub_descriptor.header;
     56        header->length = sizeof(usb_hub_descriptor_header_t);
     57        header->descriptor_type = USB_DESCTYPE_HUB;
     58        header->port_count = XHCI_MAX_PORTS;
     59        header->characteristics =
     60                    HUB_CHAR_NO_POWER_SWITCH_FLAG | HUB_CHAR_NO_OC_FLAG;
     61        header->power_good_time = 50; // TODO: This needs to be fine-tuned.
     62        header->max_current = 0;
     63
    5564        return virthub_base_init(&rh->base, "xhci rh", &ops, rh, NULL,
    56             &rh->hub_descriptor.header, HUB_STATUS_CHANGE_PIPE);
     65            header, HUB_STATUS_CHANGE_PIPE);
    5766}
    5867
Note: See TracChangeset for help on using the changeset viewer.