Changes in uspace/drv/uhci-hcd/batch.c [a9f91cd:a7e2f0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
ra9f91cd ra7e2f0d 40 40 #include "batch.h" 41 41 #include "transfer_list.h" 42 #include "uhci _hc.h"42 #include "uhci.h" 43 43 #include "utils/malloc32.h" 44 44 … … 100 100 bzero(instance, sizeof(batch_t)); 101 101 102 instance->qh = malloc32(sizeof(q h_t));102 instance->qh = malloc32(sizeof(queue_head_t)); 103 103 CHECK_NULL_DISPOSE_RETURN(instance->qh, 104 104 "Failed to allocate batch queue head.\n"); 105 q h_init(instance->qh);105 queue_head_init(instance->qh); 106 106 107 107 instance->packets = (size + max_packet_size - 1) / max_packet_size; … … 114 114 instance->tds, "Failed to allocate transfer descriptors.\n"); 115 115 bzero(instance->tds, sizeof(td_t) * instance->packets); 116 117 // const size_t transport_size = max_packet_size * instance->packets; 116 118 117 119 if (size > 0) { … … 141 143 instance->speed = speed; 142 144 instance->manager = manager; 143 instance->callback_out = func_out; 144 instance->callback_in = func_in; 145 146 qh_set_element_td(instance->qh, addr_to_phys(instance->tds)); 145 146 if (func_out) 147 instance->callback_out = func_out; 148 if (func_in) 149 instance->callback_in = func_in; 150 151 queue_head_set_element_td(instance->qh, addr_to_phys(instance->tds)); 147 152 148 153 usb_log_debug("Batch(%p) %d:%d memory structures ready.\n", … … 172 177 usb_log_debug("Batch(%p) found error TD(%d):%x.\n", 173 178 instance, i, instance->tds[i].status); 174 td_print_status(&instance->tds[i]);175 179 176 180 device_keeper_set_toggle(instance->manager, … … 314 318 ++packet; 315 319 } 316 td_set_ioc(&instance->tds[packet - 1]);317 320 device_keeper_set_toggle(instance->manager, instance->target, toggle); 318 321 } … … 366 369 0, 1, false, low_speed, instance->target, status_stage, NULL, NULL); 367 370 368 td_set_ioc(&instance->tds[packet]); 371 372 instance->tds[packet].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG; 369 373 usb_log_debug2("Control last TD status: %x.\n", 370 374 instance->tds[packet].status); … … 450 454 { 451 455 assert(instance); 452 uhci_ hc_t *hc = fun_to_uhci_hc(instance->fun);456 uhci_t *hc = fun_to_uhci(instance->fun); 453 457 assert(hc); 454 return uhci_ hc_schedule(hc, instance);458 return uhci_schedule(hc, instance); 455 459 } 456 460 /**
Note:
See TracChangeset
for help on using the changeset viewer.