Changeset 5909c59 in mainline


Ignore:
Timestamp:
2017-12-20T14:27:21Z (7 years ago)
Author:
Salmelu <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bd1fab90
Parents:
a31068a
Message:

xhci: fixed isoch_transfers array

Location:
uspace/drv/bus/usb/xhci
Files:
3 edited

Legend:

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

    ra31068a r5909c59  
    214214        int err = EOK;
    215215        while (i < XHCI_ISOCH_BUFFER_COUNT) {
    216                 xhci_isoch_transfer_t *transfer = xhci_ep->isoch_transfers[i];
     216                xhci_isoch_transfer_t *transfer = &xhci_ep->isoch_transfers[i];
    217217                if (dma_buffer_alloc(&transfer->data, xhci_ep->isoch_max_size)) {
    218218                        err = ENOMEM;
     
    226226                --i;
    227227                while(i >= 0) {
    228                         dma_buffer_free(&xhci_ep->isoch_transfers[i]->data);
     228                        dma_buffer_free(&xhci_ep->isoch_transfers[i].data);
    229229                        --i;
    230230                }
  • uspace/drv/bus/usb/xhci/endpoint.h

    ra31068a r5909c59  
    9595        /** Isochronous scheduled transfers with respective buffers */
    9696        #define XHCI_ISOCH_BUFFER_COUNT 4
    97         xhci_isoch_transfer_t* isoch_transfers[XHCI_ISOCH_BUFFER_COUNT];
     97        xhci_isoch_transfer_t isoch_transfers[XHCI_ISOCH_BUFFER_COUNT];
    9898
    9999        /** Indices to transfers */
  • uspace/drv/bus/usb/xhci/transfers.c

    ra31068a r5909c59  
    238238                return NULL;
    239239        }
    240         xhci_isoch_transfer_t *isoch_transfer = ep->isoch_transfers[ep->isoch_enqueue];
     240        xhci_isoch_transfer_t *isoch_transfer = &ep->isoch_transfers[ep->isoch_enqueue];
    241241        ep->isoch_enqueue = (ep->isoch_enqueue + 1) % XHCI_ISOCH_BUFFER_COUNT;
    242242        return isoch_transfer;
     
    244244
    245245static xhci_isoch_transfer_t* isoch_transfer_get_dequeue(xhci_endpoint_t *ep) {
    246         xhci_isoch_transfer_t *isoch_transfer = ep->isoch_transfers[ep->isoch_dequeue];
     246        xhci_isoch_transfer_t *isoch_transfer = &ep->isoch_transfers[ep->isoch_dequeue];
    247247        ep->isoch_dequeue = (ep->isoch_dequeue + 1) % XHCI_ISOCH_BUFFER_COUNT;
    248248        return isoch_transfer;
Note: See TracChangeset for help on using the changeset viewer.