Changeset deb2e55 in mainline for uspace/drv/bus/usb/xhci/transfers.c


Ignore:
Timestamp:
2017-12-28T21:54:38Z (6 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
415c5116
Parents:
66c16b0
git-author:
Petr Manek <petr.manek@…> (2017-12-28 21:54:31)
git-committer:
Petr Manek <petr.manek@…> (2017-12-28 21:54:38)
Message:

usbhost: refactoring

Moved the "online" attribute from xhci_device_t to device_t. Changed
USB2 bus implementation to produce online devices (not to break
functionality on older buses).

File:
1 edited

Legend:

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

    r66c16b0 rdeb2e55  
    261261        size_t tdpc = len / 1024 + ((len % 1024) ? 1 : 0);
    262262        size_t tbc = tdpc / (ep->max_burst + 1);
    263         if(!tdpc % (ep->max_burst + 1)) --tbc;
     263        if (!tdpc % (ep->max_burst + 1)) --tbc;
    264264        size_t bsp = tdpc % (ep->max_burst + 1);
    265265        size_t tlbpc = (bsp ? bsp - 1 : ep->max_burst);
     
    520520        xhci_device_t *xhci_dev = xhci_ep_to_dev(xhci_ep);
    521521
    522         /* Offline devices don't schedule transfers other than on EP0. */
    523         if (!xhci_dev->online && ep->endpoint > 0) {
    524                 return EAGAIN;
    525         }
    526 
    527522        // FIXME: find a better way to check if the ring is not initialized
    528523        if (!xhci_ep->ring.segment_count) {
     
    533528
    534529        // Isochronous transfer needs to be handled differently
    535         if(batch->ep->transfer_type == USB_TRANSFER_ISOCHRONOUS) {
     530        if (batch->ep->transfer_type == USB_TRANSFER_ISOCHRONOUS) {
    536531                return schedule_isochronous(hc, transfer, xhci_ep, xhci_dev);
    537532        }
Note: See TracChangeset for help on using the changeset viewer.