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/endpoint_list.c

    rb60944b r35c37fc  
    5454        assert(instance);
    5555        instance->name = name;
    56         instance->list_head = malloc32(sizeof(qh_t));
    57         if (!instance->list_head) {
     56        if (dma_buffer_alloc(&instance->dma_buffer, sizeof(qh_t))) {
    5857                usb_log_error("EPL(%p-%s): Failed to allocate list head.",
    5958                    instance, name);
    6059                return ENOMEM;
    6160        }
     61        instance->list_head = instance->dma_buffer.virt;
    6262        qh_init(instance->list_head, NULL);
    6363
Note: See TracChangeset for help on using the changeset viewer.