Ignore:
File:
1 edited

Legend:

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

    r4125b7d rc9dc471  
    141141        assert(data);
    142142        size_t tds = data->td_count;
    143         usb_log_debug("Batch(%p) checking %zu td(s) for completion.\n",
     143        usb_log_debug("Batch(%p) checking %d 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;
    150149        for (; i < tds; ++i) {
    151150                assert(data->tds[i] != NULL);
    152                 usb_log_debug("TD %zu: %x:%x:%x:%x.\n", i,
     151                usb_log_debug("TD %d: %x:%x:%x:%x.\n", i,
    153152                    data->tds[i]->status, data->tds[i]->cbp, data->tds[i]->next,
    154153                    data->tds[i]->be);
     
    157156                }
    158157                instance->error = td_error(data->tds[i]);
     158                /* FIXME: calculate real transfered size */
     159                instance->transfered_size = instance->buffer_size;
    159160                if (instance->error != EOK) {
    160                         usb_log_debug("Batch(%p) found error TD(%zu):%x.\n",
     161                        usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
    161162                            instance, i, data->tds[i]->status);
    162163                        /* Make sure TD queue is empty (one TD),
     
    173174        assert(hcd_ep);
    174175        hcd_ep->td = data->tds[i];
    175         if (i > 0)
    176                 instance->transfered_size -= td_remain_size(data->tds[i - 1]);
    177 
    178176        /* Clear possible ED HALT */
    179177        data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
     
    240238{
    241239        assert(instance);
    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;
     240        instance->next_step = usb_transfer_batch_call_in_and_dispose;
    245241        batch_data(instance);
    246         usb_log_debug("Batch(%p) BULK OUT initialized.\n", instance);
     242        usb_log_debug("Batch(%p) BULK IN initialized.\n", instance);
    247243}
    248244/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.