Changeset 1d758fc in mainline for uspace/drv/bus/usb/uhci/uhci_batch.c


Ignore:
Timestamp:
2018-02-12T10:11:47Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5fe3f954
Parents:
2f762a7
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-05 03:28:50)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-12 10:11:47)
Message:

usb: rethinking DMA buffers

File:
1 edited

Legend:

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

    r2f762a7 r1d758fc  
    9898        usb_transfer_batch_t *usb_batch = &uhci_batch->base;
    9999
    100         uhci_batch->td_count = (usb_batch->buffer_size + usb_batch->ep->max_packet_size - 1)
     100        uhci_batch->td_count = (usb_batch->size + usb_batch->ep->max_packet_size - 1)
    101101                / usb_batch->ep->max_packet_size;
    102102
     
    190190        }
    191191
    192         assert(batch->transferred_size <= batch->buffer_size);
     192        assert(batch->transferred_size <= batch->size);
    193193
    194194        return true;
     
    228228
    229229        size_t td = 0;
    230         size_t remain_size = uhci_batch->base.buffer_size;
     230        size_t remain_size = uhci_batch->base.size;
    231231        char *buffer = uhci_transfer_batch_data_buffer(uhci_batch);
    232232
     
    297297        size_t td = 1;
    298298        unsigned toggle = 1;
    299         size_t remain_size = uhci_batch->base.buffer_size;
     299        size_t remain_size = uhci_batch->base.size;
    300300        char *buffer = uhci_transfer_batch_data_buffer(uhci_batch);
    301301
Note: See TracChangeset for help on using the changeset viewer.