Changeset a91fbb1 in mainline for uspace/drv/ohci/batch.c


Ignore:
Timestamp:
2011-04-15T20:53:17Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c2cbcf
Parents:
27b85d9 (diff), 8595577b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/batch.c

    r27b85d9 ra91fbb1  
    147147            data->ed->next);
    148148        size_t i = 0;
     149        instance->transfered_size = instance->buffer_size;
    149150        for (; i < tds; ++i) {
    150151                assert(data->tds[i] != NULL);
     
    156157                }
    157158                instance->error = td_error(data->tds[i]);
    158                 /* FIXME: calculate real transfered size */
    159                 instance->transfered_size = instance->buffer_size;
    160159                if (instance->error != EOK) {
    161160                        usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
     
    174173        assert(hcd_ep);
    175174        hcd_ep->td = data->tds[i];
     175        if (i > 0)
     176                instance->transfered_size -= td_remain_size(data->tds[i - 1]);
     177
    176178        /* Clear possible ED HALT */
    177179        data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
     
    238240{
    239241        assert(instance);
    240         instance->next_step = usb_transfer_batch_call_in_and_dispose;
     242        /* We are data out, we are supposed to provide data */
     243        memcpy(instance->data_buffer, instance->buffer, instance->buffer_size);
     244        instance->next_step = usb_transfer_batch_call_out_and_dispose;
    241245        batch_data(instance);
    242         usb_log_debug("Batch(%p) BULK IN initialized.\n", instance);
     246        usb_log_debug("Batch(%p) BULK OUT initialized.\n", instance);
    243247}
    244248/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.