Changes in uspace/drv/uhci-hcd/batch.c [a7e2f0d:a9f91cd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
ra7e2f0d ra9f91cd 40 40 #include "batch.h" 41 41 #include "transfer_list.h" 42 #include "uhci .h"42 #include "uhci_hc.h" 43 43 #include "utils/malloc32.h" 44 44 … … 100 100 bzero(instance, sizeof(batch_t)); 101 101 102 instance->qh = malloc32(sizeof(q ueue_head_t));102 instance->qh = malloc32(sizeof(qh_t)); 103 103 CHECK_NULL_DISPOSE_RETURN(instance->qh, 104 104 "Failed to allocate batch queue head.\n"); 105 q ueue_head_init(instance->qh);105 qh_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;118 116 119 117 if (size > 0) { … … 143 141 instance->speed = speed; 144 142 instance->manager = manager; 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)); 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)); 152 147 153 148 usb_log_debug("Batch(%p) %d:%d memory structures ready.\n", … … 177 172 usb_log_debug("Batch(%p) found error TD(%d):%x.\n", 178 173 instance, i, instance->tds[i].status); 174 td_print_status(&instance->tds[i]); 179 175 180 176 device_keeper_set_toggle(instance->manager, … … 318 314 ++packet; 319 315 } 316 td_set_ioc(&instance->tds[packet - 1]); 320 317 device_keeper_set_toggle(instance->manager, instance->target, toggle); 321 318 } … … 369 366 0, 1, false, low_speed, instance->target, status_stage, NULL, NULL); 370 367 371 372 instance->tds[packet].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG; 368 td_set_ioc(&instance->tds[packet]); 373 369 usb_log_debug2("Control last TD status: %x.\n", 374 370 instance->tds[packet].status); … … 454 450 { 455 451 assert(instance); 456 uhci_ t *hc = fun_to_uhci(instance->fun);452 uhci_hc_t *hc = fun_to_uhci_hc(instance->fun); 457 453 assert(hc); 458 return uhci_ schedule(hc, instance);454 return uhci_hc_schedule(hc, instance); 459 455 } 460 456 /**
Note:
See TracChangeset
for help on using the changeset viewer.