Ignore:
File:
1 edited

Legend:

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

    rfeb10c88 r4ca18ae  
    8080 * transaction and callback.
    8181 */
    82 usb_transfer_batch_t * batch_get(ddf_fun_t *fun, endpoint_t *ep,
    83     char *buffer, size_t buffer_size, char* setup_buffer, size_t setup_size,
     82usb_transfer_batch_t * batch_get(ddf_fun_t *fun, usb_target_t target,
     83    usb_transfer_type_t transfer_type, size_t max_packet_size,
     84    usb_speed_t speed, char *buffer, size_t buffer_size,
     85    char* setup_buffer, size_t setup_size,
    8486    usbhc_iface_transfer_in_callback_t func_in,
    85     usbhc_iface_transfer_out_callback_t func_out, void *arg)
    86 {
    87         assert(ep);
     87    usbhc_iface_transfer_out_callback_t func_out, void *arg, endpoint_t *ep
     88    )
     89{
    8890        assert(func_in == NULL || func_out == NULL);
    8991        assert(func_in != NULL || func_out != NULL);
     
    101103        CHECK_NULL_DISPOSE_RETURN(instance,
    102104            "Failed to allocate batch instance.\n");
    103         usb_target_t target =
    104             { .address = ep->address, .endpoint = ep->endpoint };
    105105        usb_transfer_batch_init(instance, target,
    106             ep->transfer_type, ep->speed, ep->max_packet_size,
     106            transfer_type, speed, max_packet_size,
    107107            buffer, NULL, buffer_size, NULL, setup_size, func_in,
    108108            func_out, arg, fun, ep, NULL);
     
    115115        instance->private_data = data;
    116116
    117         data->transfers =
    118             (buffer_size + ep->max_packet_size - 1) / ep->max_packet_size;
    119         if (ep->transfer_type == USB_TRANSFER_CONTROL) {
     117        data->transfers = (buffer_size + max_packet_size - 1) / max_packet_size;
     118        if (transfer_type == USB_TRANSFER_CONTROL) {
    120119                data->transfers += 2;
    121120        }
     
    179178                            instance, i, data->tds[i].status);
    180179                        td_print_status(&data->tds[i]);
    181                         assert(instance->ep != NULL);
    182 
    183                         endpoint_toggle_set(instance->ep,
    184                             td_toggle(&data->tds[i]));
     180                        if (instance->ep != NULL)
     181                                endpoint_toggle_set(instance->ep,
     182                                    td_toggle(&data->tds[i]));
    185183                        if (i > 0)
    186184                                goto substract_ret;
Note: See TracChangeset for help on using the changeset viewer.