Changeset 63adb18 in mainline for uspace/drv/bus/usb/xhci/transfers.h


Ignore:
Timestamp:
2017-10-11T18:53:03Z (8 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e74911
Parents:
eaf5e86
Message:

Added transfer block data structure and dequeue mechanism.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/transfers.h

    reaf5e86 r63adb18  
    4444
    4545        usb_transfer_batch_t* batch;
     46
     47        size_t completed_size;       /* Number of successfully transferred bytes. */
     48        size_t scheduled_size;       /* Number of bytes scheduled for transfer. */
     49        list_t active_blocks;        /* List of data blocks transferred right now. */
    4650} xhci_transfer_t;
     51
     52typedef struct {
     53        link_t link;
     54
     55        uintptr_t buffer;            /* Physical address of the buffer start. */
     56        size_t total_size;           /* Total size available in the block. */
     57        size_t filled_size;          /* Size of the data in the block. */
     58
     59        xhci_transfer_t* transfer;   /* Current transfer or NULL. */
     60} xhci_transfer_block_t;
    4761
    4862int xhci_init_transfers(xhci_hc_t*);
     
    5367int xhci_schedule_bulk_transfer(xhci_hc_t*, usb_transfer_batch_t*);
    5468int xhci_handle_transfer_event(xhci_hc_t*, xhci_trb_t*);
     69
     70xhci_transfer_block_t* xhci_transfer_block_alloc(size_t);
     71void xhci_transfer_block_fini(xhci_transfer_block_t*);
     72int xhci_dequeue_transfer_block(xhci_hc_t*, size_t, xhci_transfer_block_t**);
     73int xhci_free_transfer_block(xhci_hc_t*, xhci_transfer_block_t*);
     74int xhci_schedule_transfer_block(xhci_hc_t*, xhci_transfer_block_t*);
Note: See TracChangeset for help on using the changeset viewer.