Changeset c21e6a5 in mainline for uspace/drv/bus/usb/uhci/uhci_batch.h


Ignore:
Timestamp:
2018-02-05T00:54:08Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af16ebe
Parents:
65c059f
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-05 00:27:40)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-05 00:54:08)
Message:

usbhost: prepare buffers for transfers in library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci_batch.h

    r65c059f rc21e6a5  
    6161        /** Number of TDs used by the transfer */
    6262        size_t td_count;
    63         /** Data buffer, must be accessible by the UHCI hw */
    64         void *device_buffer;
     63        /* Setup data */
     64        char *setup_buffer;
     65        /** Backing TDs + setup_buffer */
     66        dma_buffer_t uhci_dma_buffer;
    6567        /** List element */
    6668        link_t link;
     
    8082{
    8183        assert(uhci_batch);
    82         assert(uhci_batch->device_buffer);
    83         return uhci_batch->device_buffer + sizeof(qh_t) +
     84        return uhci_batch->uhci_dma_buffer.virt + sizeof(qh_t) +
    8485            uhci_batch->td_count * sizeof(td_t);
    8586}
     
    9394{
    9495        assert(uhci_batch);
    95         return uhci_transfer_batch_setup_buffer(uhci_batch) +
    96             (uhci_batch->base.ep->transfer_type == USB_TRANSFER_CONTROL ? USB_SETUP_PACKET_SIZE : 0);
     96        return uhci_batch->base.dma_buffer.virt;
    9797}
    9898
Note: See TracChangeset for help on using the changeset viewer.