Ignore:
File:
1 edited

Legend:

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

    r81dce9f rc15070c  
    183183
    184184                        device_keeper_set_toggle(data->manager,
    185                             instance->target, td_toggle(&data->tds[i]));
     185                            instance->target, instance->direction,
     186                            td_toggle(&data->tds[i]));
    186187                        if (i > 0)
    187188                                goto substract_ret;
     
    238239{
    239240        assert(instance);
     241        instance->direction = USB_DIRECTION_IN;
    240242        batch_data(instance, USB_PID_IN);
    241243        instance->next_step = batch_call_in_and_dispose;
     
    252254{
    253255        assert(instance);
     256        instance->direction = USB_DIRECTION_OUT;
    254257        /* We are data out, we are supposed to provide data */
    255258        memcpy(instance->transport_buffer, instance->buffer,
     
    270273        assert(instance);
    271274        batch_data(instance, USB_PID_IN);
     275        instance->direction = USB_DIRECTION_IN;
    272276        instance->next_step = batch_call_in_and_dispose;
    273277        usb_log_debug("Batch(%p) BULK IN initialized.\n", instance);
     
    283287{
    284288        assert(instance);
     289        instance->direction = USB_DIRECTION_OUT;
    285290        /* We are data out, we are supposed to provide data */
    286291        memcpy(instance->transport_buffer, instance->buffer,
     
    306311
    307312        const bool low_speed = instance->speed == USB_SPEED_LOW;
    308         int toggle = device_keeper_get_toggle(data->manager, instance->target);
     313        int toggle = device_keeper_get_toggle(
     314            data->manager, instance->target, instance->direction);
    309315        assert(toggle == 0 || toggle == 1);
    310316
     
    337343        }
    338344        td_set_ioc(&data->tds[packet - 1]);
    339         device_keeper_set_toggle(data->manager, instance->target, toggle);
     345        device_keeper_set_toggle(data->manager, instance->target,
     346            instance->direction, toggle);
    340347}
    341348/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.