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


Ignore:
Timestamp:
2018-01-19T20:56:14Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7ec7b7e
Parents:
69b2dfee
Message:

libusbhost: do not try to handle the toggle bit in a generic way

File:
1 edited

Legend:

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

    r69b2dfee rc6f82e5  
    4646
    4747#include "uhci_batch.h"
     48#include "hc.h"
    4849#include "hw_struct/transfer_descriptor.h"
    4950
     
    164165        batch->transfered_size = 0;
    165166
     167        uhci_endpoint_t *uhci_ep = (uhci_endpoint_t *) batch->ep;
     168
    166169        for (size_t i = 0;i < uhci_batch->td_count; ++i) {
    167170                if (td_is_active(&uhci_batch->tds[i])) {
     
    178181                        td_print_status(&uhci_batch->tds[i]);
    179182
    180                         batch->ep->toggle = td_toggle(&uhci_batch->tds[i]);
     183                        uhci_ep->toggle = td_toggle(&uhci_batch->tds[i]);
    181184                        goto substract_ret;
    182185                }
     
    230233        const size_t mps = uhci_batch->base.ep->max_packet_size;
    231234
    232         int toggle = uhci_batch->base.ep->toggle;
     235        uhci_endpoint_t *uhci_ep = (uhci_endpoint_t *) uhci_batch->base.ep;
     236
     237        int toggle = uhci_ep->toggle;
    233238        assert(toggle == 0 || toggle == 1);
    234239
     
    254259        }
    255260        td_set_ioc(&uhci_batch->tds[td - 1]);
    256         uhci_batch->base.ep->toggle = toggle;
     261        uhci_ep->toggle = toggle;
    257262        usb_log_debug2(
    258263            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
Note: See TracChangeset for help on using the changeset viewer.