Changeset 44b1674 in mainline for uspace/drv/ohci/batch.c


Ignore:
Timestamp:
2011-04-18T21:48:55Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9014dcd
Parents:
618f9ed (diff), 84a04dd (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 form usb/development

File:
1 edited

Legend:

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

    r618f9ed r44b1674  
    141141        assert(data);
    142142        size_t tds = data->td_count;
    143         usb_log_debug("Batch(%p) checking %d td(s) for completion.\n",
     143        usb_log_debug("Batch(%p) checking %zu td(s) for completion.\n",
    144144            instance, tds);
    145145        usb_log_debug("ED: %x:%x:%x:%x.\n",
     
    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);
    151                 usb_log_debug("TD %d: %x:%x:%x:%x.\n", i,
     152                usb_log_debug("TD %zu: %x:%x:%x:%x.\n", i,
    152153                    data->tds[i]->status, data->tds[i]->cbp, data->tds[i]->next,
    153154                    data->tds[i]->be);
     
    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) {
    161                         usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
     160                        usb_log_debug("Batch(%p) found error TD(%zu):%x.\n",
    162161                            instance, i, data->tds[i]->status);
    163162                        /* Make sure TD queue is empty (one TD),
     
    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.