Changes in uspace/drv/ohci/batch.c [c9dc471:4125b7d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/batch.c
rc9dc471 r4125b7d 141 141 assert(data); 142 142 size_t tds = data->td_count; 143 usb_log_debug("Batch(%p) checking % dtd(s) for completion.\n",143 usb_log_debug("Batch(%p) checking %zu td(s) for completion.\n", 144 144 instance, tds); 145 145 usb_log_debug("ED: %x:%x:%x:%x.\n", … … 147 147 data->ed->next); 148 148 size_t i = 0; 149 instance->transfered_size = instance->buffer_size; 149 150 for (; i < tds; ++i) { 150 151 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, 152 153 data->tds[i]->status, data->tds[i]->cbp, data->tds[i]->next, 153 154 data->tds[i]->be); … … 156 157 } 157 158 instance->error = td_error(data->tds[i]); 158 /* FIXME: calculate real transfered size */159 instance->transfered_size = instance->buffer_size;160 159 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", 162 161 instance, i, data->tds[i]->status); 163 162 /* Make sure TD queue is empty (one TD), … … 174 173 assert(hcd_ep); 175 174 hcd_ep->td = data->tds[i]; 175 if (i > 0) 176 instance->transfered_size -= td_remain_size(data->tds[i - 1]); 177 176 178 /* Clear possible ED HALT */ 177 179 data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG; … … 238 240 { 239 241 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; 241 245 batch_data(instance); 242 usb_log_debug("Batch(%p) BULK INinitialized.\n", instance);246 usb_log_debug("Batch(%p) BULK OUT initialized.\n", instance); 243 247 } 244 248 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.