Changeset d4beec3 in mainline for uspace/drv/uhci-hcd/iface.c


Ignore:
Timestamp:
2011-03-06T19:01:09Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
960bee9, c867a216
Parents:
24d5432 (diff), 8a20380 (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:

Fix toggle protocol implementation

File:
1 edited

Legend:

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

    r24d5432 rd4beec3  
    114114
    115115        batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT,
    116             max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
     116            max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg,
     117            &hc->device_manager);
    117118        if (!batch)
    118119                return ENOMEM;
     
    133134
    134135        batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT,
    135             max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg);
     136            max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg,
     137                        &hc->device_manager);
    136138        if (!batch)
    137139                return ENOMEM;
     
    153155
    154156        batch_t *batch = batch_get(fun, target, USB_TRANSFER_BULK,
    155             max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
     157            max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg,
     158            &hc->device_manager);
    156159        if (!batch)
    157160                return ENOMEM;
     
    172175
    173176        batch_t *batch = batch_get(fun, target, USB_TRANSFER_BULK,
    174             max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg);
     177            max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg,
     178            &hc->device_manager);
    175179        if (!batch)
    176180                return ENOMEM;
     
    191195            target.address, target.endpoint, size, max_packet_size);
    192196
     197        if (setup_size != 8)
     198                return EINVAL;
     199
    193200        batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL,
    194201            max_packet_size, speed, data, size, setup_data, setup_size,
    195             NULL, callback, arg);
    196         if (!batch)
    197                 return ENOMEM;
     202            NULL, callback, arg, &hc->device_manager);
     203        if (!batch)
     204                return ENOMEM;
     205        device_keeper_reset_if_need(&hc->device_manager, target, setup_data);
    198206        batch_control_write(batch);
    199207        return EOK;
     
    214222        batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL,
    215223            max_packet_size, speed, data, size, setup_data, setup_size, callback,
    216             NULL, arg);
     224            NULL, arg, &hc->device_manager);
    217225        if (!batch)
    218226                return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.