Changes in uspace/drv/uhci-hcd/batch.c [4ca18ae:20a1e76] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
r4ca18ae r20a1e76 49 49 td_t *tds; 50 50 size_t transfers; 51 usb_device_keeper_t *manager; 51 52 } uhci_batch_t; 52 53 … … 72 73 * @param[in] func_out function to call on outbound transaction completion 73 74 * @param[in] arg additional parameter to func_in or func_out 74 * @param[in] ep Pointer to endpointtoggle management structure.75 * @param[in] manager Pointer to toggle management structure. 75 76 * @return Valid pointer if all substructures were successfully created, 76 77 * NULL otherwise. … … 85 86 char* setup_buffer, size_t setup_size, 86 87 usbhc_iface_transfer_in_callback_t func_in, 87 usbhc_iface_transfer_out_callback_t func_out, void *arg, endpoint_t *ep 88 usbhc_iface_transfer_out_callback_t func_out, void *arg, 89 usb_device_keeper_t *manager 88 90 ) 89 91 { … … 103 105 CHECK_NULL_DISPOSE_RETURN(instance, 104 106 "Failed to allocate batch instance.\n"); 105 usb_transfer_batch_init(instance, target, 106 transfer_type, speed, max_packet_size, 107 usb_transfer_batch_init(instance, target, transfer_type, speed, max_packet_size, 107 108 buffer, NULL, buffer_size, NULL, setup_size, func_in, 108 func_out, arg, fun, ep,NULL);109 func_out, arg, fun, NULL); 109 110 110 111 … … 113 114 "Failed to allocate batch instance.\n"); 114 115 bzero(data, sizeof(uhci_batch_t)); 116 data->manager = manager; 115 117 instance->private_data = data; 116 118 … … 178 180 instance, i, data->tds[i].status); 179 181 td_print_status(&data->tds[i]); 180 if (instance->ep != NULL) 181 endpoint_toggle_set(instance->ep, 182 td_toggle(&data->tds[i])); 182 183 usb_device_keeper_set_toggle(data->manager, 184 instance->target, instance->direction, 185 td_toggle(&data->tds[i])); 183 186 if (i > 0) 184 187 goto substract_ret; … … 307 310 308 311 const bool low_speed = instance->speed == USB_SPEED_LOW; 309 int toggle = endpoint_toggle_get(instance->ep); 312 int toggle = usb_device_keeper_get_toggle( 313 data->manager, instance->target, instance->direction); 310 314 assert(toggle == 0 || toggle == 1); 311 315 … … 338 342 } 339 343 td_set_ioc(&data->tds[transfer - 1]); 340 endpoint_toggle_set(instance->ep, toggle); 344 usb_device_keeper_set_toggle(data->manager, instance->target, 345 instance->direction, toggle); 341 346 } 342 347 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.