Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/batch.c

    r20a1e76 r4ca18ae  
    4949        td_t *tds;
    5050        size_t transfers;
    51         usb_device_keeper_t *manager;
    5251} uhci_batch_t;
    5352
     
    7372 * @param[in] func_out function to call on outbound transaction completion
    7473 * @param[in] arg additional parameter to func_in or func_out
    75  * @param[in] manager Pointer to toggle management structure.
     74 * @param[in] ep Pointer to endpoint toggle management structure.
    7675 * @return Valid pointer if all substructures were successfully created,
    7776 * NULL otherwise.
     
    8685    char* setup_buffer, size_t setup_size,
    8786    usbhc_iface_transfer_in_callback_t func_in,
    88     usbhc_iface_transfer_out_callback_t func_out, void *arg,
    89     usb_device_keeper_t *manager
     87    usbhc_iface_transfer_out_callback_t func_out, void *arg, endpoint_t *ep
    9088    )
    9189{
     
    105103        CHECK_NULL_DISPOSE_RETURN(instance,
    106104            "Failed to allocate batch instance.\n");
    107         usb_transfer_batch_init(instance, target, transfer_type, speed, max_packet_size,
     105        usb_transfer_batch_init(instance, target,
     106            transfer_type, speed, max_packet_size,
    108107            buffer, NULL, buffer_size, NULL, setup_size, func_in,
    109             func_out, arg, fun, NULL);
     108            func_out, arg, fun, ep, NULL);
    110109
    111110
     
    114113            "Failed to allocate batch instance.\n");
    115114        bzero(data, sizeof(uhci_batch_t));
    116         data->manager = manager;
    117115        instance->private_data = data;
    118116
     
    180178                            instance, i, data->tds[i].status);
    181179                        td_print_status(&data->tds[i]);
    182 
    183                         usb_device_keeper_set_toggle(data->manager,
    184                             instance->target, instance->direction,
    185                             td_toggle(&data->tds[i]));
     180                        if (instance->ep != NULL)
     181                                endpoint_toggle_set(instance->ep,
     182                                    td_toggle(&data->tds[i]));
    186183                        if (i > 0)
    187184                                goto substract_ret;
     
    310307
    311308        const bool low_speed = instance->speed == USB_SPEED_LOW;
    312         int toggle = usb_device_keeper_get_toggle(
    313             data->manager, instance->target, instance->direction);
     309        int toggle = endpoint_toggle_get(instance->ep);
    314310        assert(toggle == 0 || toggle == 1);
    315311
     
    342338        }
    343339        td_set_ioc(&data->tds[transfer - 1]);
    344         usb_device_keeper_set_toggle(data->manager, instance->target,
    345             instance->direction, toggle);
     340        endpoint_toggle_set(instance->ep, toggle);
    346341}
    347342/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.