Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 27b0ea0 in mainline


Ignore:
Timestamp:
2017-11-20T22:15:11Z (4 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master
Children:
9162b27
Parents:
6b433a8
git-author:
Aearsis <Hlavaty.Ondrej@…> (2017-11-20 22:11:32)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2017-11-20 22:15:11)
Message:

ehci: fixed bugs introduced by refactoring

Location:
uspace/drv/bus/usb/ehci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.c

    r6b433a8 r27b0ea0  
    238238        assert(ehci_batch->base.transfered_size <= ehci_batch->base.buffer_size);
    239239
     240        const size_t setup_size = (ehci_batch->base.ep->transfer_type == USB_TRANSFER_CONTROL)
     241                ? USB_SETUP_PACKET_SIZE
     242                : 0;
     243
    240244        if (ehci_batch->base.dir == USB_DIRECTION_IN)
    241                 memcpy(ehci_batch->base.buffer, ehci_batch->device_buffer, ehci_batch->base.transfered_size);
     245                memcpy(ehci_batch->base.buffer,
     246                    ehci_batch->device_buffer + setup_size,
     247                    ehci_batch->base.transfered_size);
    242248
    243249        /* Clear TD pointers */
  • uspace/drv/bus/usb/ehci/hw_struct/queue_head.c

    r6b433a8 r27b0ea0  
    4646        [USB_SPEED_FULL] = QH_EP_CHAR_EPS_FS,
    4747        [USB_SPEED_HIGH] = QH_EP_CHAR_EPS_HS,
     48
     49        /* Solely for the roothub */
     50        [USB_SPEED_MAX] = 0,
    4851};
    4952
Note: See TracChangeset for help on using the changeset viewer.