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


Ignore:
Timestamp:
2017-10-26T08:38:53Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
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/endpoint.c

    r62558202 r25251bb  
    269269}
    270270
    271 int xhci_device_add_endpoint(xhci_device_t *dev, xhci_endpoint_t *ep)
     271int xhci_device_add_endpoint(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *ep)
    272272{
    273273        assert(dev);
     
    299299        xhci_setup_endpoint_context(ep, &ep_ctx);
    300300
    301         return hc_add_endpoint(dev->hc, dev->slot_id, xhci_endpoint_index(ep), &ep_ctx);
    302 }
    303 
    304 int xhci_device_remove_endpoint(xhci_device_t *dev, xhci_endpoint_t *ep)
     301        return hc_add_endpoint(hc, dev->slot_id, xhci_endpoint_index(ep), &ep_ctx);
     302}
     303
     304int xhci_device_remove_endpoint(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *ep)
    305305{
    306306        assert(&dev->base == ep->base.device);
     
    320320
    321321        /* Drop the endpoint. */
    322         if ((err = hc_drop_endpoint(dev->hc, dev->slot_id, xhci_endpoint_index(ep)))) {
     322        if ((err = hc_drop_endpoint(hc, dev->slot_id, xhci_endpoint_index(ep)))) {
    323323                goto err;
    324324        }
Note: See TracChangeset for help on using the changeset viewer.