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

Changeset 25251bb in mainline for uspace/drv/bus/usb/xhci/rh.c


Ignore:
Timestamp:
2017-10-26T08:38:53Z (4 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master
Children:
928afc8d
Parents:
62558202
Message:

xhci: move pointer to hc from device to bus

Also, fixes the bug of hc ptr not set on tier 2+ device.

File:
1 edited

Legend:

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

    r62558202 r25251bb  
    102102        const xhci_port_speed_t *port_speed = xhci_rh_get_port_speed(rh, port_id);
    103103        xhci_device_t *xhci_dev = xhci_device_get(dev);
    104         xhci_dev->hc = rh->hc;
    105104        xhci_dev->usb3 = port_speed->major == 3;
    106105        xhci_dev->rh_port = port_id;
     
    363362}
    364363
    365 static inline int get_hub_available_bandwidth(xhci_device_t* dev, uint8_t speed, xhci_port_bandwidth_ctx_t *ctx) {
     364static inline int get_hub_available_bandwidth(xhci_hc_t *hc, xhci_device_t* dev, uint8_t speed, xhci_port_bandwidth_ctx_t *ctx) {
    366365        // TODO: find a correct place for this function + API
    367366        // We need speed, because a root hub device has both USB 2 and USB 3 speeds
     
    383382
    384383        int err;
    385         if ((err = xhci_cmd_sync(dev->hc, &cmd))) {
     384        if ((err = xhci_cmd_sync(hc, &cmd))) {
    386385                goto end;
    387386        }
Note: See TracChangeset for help on using the changeset viewer.