Changes in uspace/drv/uhci-hcd/batch.c [a9f91cd:67352d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
ra9f91cd r67352d2 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", … … 314 319 ++packet; 315 320 } 316 td_set_ioc(&instance->tds[packet - 1]);321 instance->tds[packet - 1].status |= TD_STATUS_IOC_FLAG; 317 322 device_keeper_set_toggle(instance->manager, instance->target, toggle); 318 323 } … … 366 371 0, 1, false, low_speed, instance->target, status_stage, NULL, NULL); 367 372 368 td_set_ioc(&instance->tds[packet]); 373 374 instance->tds[packet].status |= TD_STATUS_IOC_FLAG; 369 375 usb_log_debug2("Control last TD status: %x.\n", 370 376 instance->tds[packet].status); … … 450 456 { 451 457 assert(instance); 452 uhci_ hc_t *hc = fun_to_uhci_hc(instance->fun);458 uhci_t *hc = fun_to_uhci(instance->fun); 453 459 assert(hc); 454 return uhci_ hc_schedule(hc, instance);460 return uhci_schedule(hc, instance); 455 461 } 456 462 /**
Note:
See TracChangeset
for help on using the changeset viewer.