Changeset 35c37fc in mainline for uspace/drv/bus/usb/ehci/ehci_batch.h


Ignore:
Timestamp:
2018-01-05T20:15: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:
9e5b162
Parents:
b60944b
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-05 16:11:04)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-05 20:15:08)
Message:

ehci: refactor to dma_buffers

One big hidden thing was refactored - now TDs are allocated in one
buffer together with setup and data buffers themselves. This reduces the
number of allocated pages per transfer to minimum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.h

    rb60944b r35c37fc  
    3939#include <stdbool.h>
    4040#include <usb/host/usb_transfer_batch.h>
     41#include <usb/host/dma_buffer.h>
    4142
    4243#include "hw_struct/queue_head.h"
     
    4647typedef struct ehci_transfer_batch {
    4748        usb_transfer_batch_t base;
     49        /** Number of TDs used by the transfer */
     50        size_t td_count;
    4851        /** Link */
    4952        link_t link;
    5053        /** Endpoint descriptor of the target endpoint. */
    5154        qh_t *qh;
    52         /** List of TDs needed for the transfer */
    53         td_t **tds;
    54         /** Number of TDs used by the transfer */
    55         size_t td_count;
    5655        /** Data buffer, must be accessible by the EHCI hw. */
    57         char *device_buffer;
     56        dma_buffer_t dma_buffer;
     57        /** List of TDs needed for the transfer - backed by dma_buffer */
     58        td_t *tds;
     59        /** Data buffers - backed by dma_buffer */
     60        void *setup_buffer;
     61        void *data_buffer;
    5862        /** Generic USB transfer structure */
    5963        usb_transfer_batch_t *usb_batch;
Note: See TracChangeset for help on using the changeset viewer.