Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/ehci/ehci_bus.c


Ignore:
Timestamp:
2017-10-21T20:52:56Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
766043c
Parents:
74b852b
Message:

usbhost refactoring: let transfer_batch be initialized by bus

Currently makes older HCs fail, work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_bus.c

    r74b852b r5fd9c30  
    4141
    4242#include "ehci_bus.h"
     43#include "ehci_batch.h"
    4344#include "hc.h"
    4445
     
    140141        hc_dequeue_endpoint(bus->hc, ep);
    141142        return EOK;
     143}
    142144
     145static usb_transfer_batch_t *ehci_bus_create_batch(bus_t *bus, endpoint_t *ep)
     146{
     147        ehci_transfer_batch_t *batch = ehci_transfer_batch_create(ep);
     148        return &batch->base;
     149}
     150
     151static void ehci_bus_destroy_batch(usb_transfer_batch_t *batch)
     152{
     153        ehci_transfer_batch_destroy(ehci_transfer_batch_get(batch));
    143154}
    144155
     
    161172        ops->release_endpoint = ehci_release_ep;
    162173
     174        ops->create_batch = ehci_bus_create_batch;
     175        ops->destroy_batch = ehci_bus_destroy_batch;
     176
    163177        bus->hc = hc;
    164178
Note: See TracChangeset for help on using the changeset viewer.