Changeset 1af4c00 in mainline for uspace/drv/bus/usb/xhci/endpoint.c


Ignore:
Timestamp:
2018-01-17T13:28:34Z (7 years ago)
Author:
Salmelu <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4cc0c2e0
Parents:
61e27e80
Message:

xhci: fixed transition to and from streams

Added remove streams function to transition the endpoint back to single ring no streams mode.
Requesting streams now stops the endpoint, clears the ring and executes update endpoint command.

File:
1 edited

Legend:

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

    r61e27e80 r1af4c00  
    4747
    4848static int alloc_transfer_ds(xhci_endpoint_t *);
    49 static void free_transfer_ds(xhci_endpoint_t *);
    5049
    5150/**
     
    121120        assert(xhci_ep);
    122121
    123         free_transfer_ds(xhci_ep);
     122        xhci_endpoint_free_transfer_ds(xhci_ep);
    124123
    125124        // TODO: Something missed?
     
    156155}
    157156
    158 /** Allocate transfer data structures for XHCI endpoint.
     157/** Allocate transfer data structures for XHCI endpoint not using streams.
    159158 * @param[in] xhci_ep XHCI endpoint to allocate data structures for.
    160159 *
     
    166165        usb_log_debug2("Allocating main transfer ring for endpoint " XHCI_EP_FMT, XHCI_EP_ARGS(*xhci_ep));
    167166
    168         xhci_ep->primary_stream_ctx_array = NULL;
     167        xhci_ep->primary_stream_data_array = NULL;
     168        xhci_ep->primary_stream_data_size = 0;
    169169
    170170        int err;
     
    186186 * @param[in] xhci_ep XHCI endpoint to free data structures for.
    187187 */
    188 static void free_transfer_ds(xhci_endpoint_t *xhci_ep)
     188void xhci_endpoint_free_transfer_ds(xhci_endpoint_t *xhci_ep)
    189189{
    190190        if (xhci_ep->primary_stream_data_size) {
Note: See TracChangeset for help on using the changeset viewer.