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


Ignore:
Timestamp:
2017-10-21T20:52:56Z (7 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/xhci/bus.c

    r74b852b r5fd9c30  
    4848#include "bus.h"
    4949#include "endpoint.h"
     50#include "transfers.h"
    5051
    5152/** Element of the hash table. */
     
    310311}
    311312
     313static usb_transfer_batch_t *create_batch(bus_t *bus, endpoint_t *ep)
     314{
     315        xhci_transfer_t *transfer = xhci_transfer_create(ep);
     316        return &transfer->batch;
     317}
     318
     319static void destroy_batch(usb_transfer_batch_t *batch)
     320{
     321        xhci_transfer_destroy(xhci_transfer_from_batch(batch));
     322}
     323
    312324static const bus_ops_t xhci_bus_ops = {
    313325        .enumerate_device = enumerate_device,
     
    329341        .endpoint_get_toggle = endpoint_get_toggle,
    330342        .endpoint_set_toggle = endpoint_set_toggle,
     343
     344        .create_batch = create_batch,
     345        .destroy_batch = destroy_batch,
    331346};
    332347
Note: See TracChangeset for help on using the changeset viewer.