Changeset 48fe0c9 in mainline for uspace/drv/uhci-hcd/batch.c


Ignore:
Timestamp:
2011-03-21T13:43:27Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
361e61b, 5971dd3, 8a951ca
Parents:
0e45e7f (diff), 925e099 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

OHCI hc driver software side implementation

File:
1 edited

Legend:

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

    r0e45e7f r48fe0c9  
    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.