Changeset af16ebe in mainline for uspace/drv/bus/usb/xhci/trb_ring.c


Ignore:
Timestamp:
2018-02-05T00:54:52Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
239eea41
Parents:
c21e6a5
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-05 00:49:07)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-05 00:54:52)
Message:

usb: redefine max_transfer_size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/trb_ring.c

    rc21e6a5 raf16ebe  
    223223        errno_t err;
    224224        assert(trbs > 0);
     225
     226        if (trbs > xhci_trb_ring_size(ring))
     227                return ELIMIT;
     228
    225229        fibril_mutex_lock(&ring->guard);
    226230
     
    309313}
    310314
     315size_t xhci_trb_ring_size(xhci_trb_ring_t *ring)
     316{
     317        return ring->segment_count * SEGMENT_TRB_USEFUL_COUNT;
     318}
     319
    311320/**
    312321 * Initializes an event ring.
Note: See TracChangeset for help on using the changeset viewer.