Ignore:
File:
1 edited

Legend:

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

    r83c439c r61bb85d  
    109109        dev_speed_t speed = FULL_SPEED;
    110110
    111         batch_t *batch = batch_get(dev, target, USB_TRANSFER_INTERRUPT,
    112             max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
    113         if (!batch)
    114                 return ENOMEM;
    115         batch_interrupt_out(batch);
     111        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_INTERRUPT,
     112            max_packet_size, speed, data, size, NULL, callback, arg);
     113        if (!tracker)
     114                return ENOMEM;
     115        tracker_interrupt_out(tracker);
    116116        return EOK;
    117117}
     
    124124        dev_speed_t speed = FULL_SPEED;
    125125
    126         batch_t *batch = batch_get(dev, target, USB_TRANSFER_INTERRUPT,
    127             max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg);
    128         if (!batch)
    129                 return ENOMEM;
    130         batch_interrupt_in(batch);
     126        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_INTERRUPT,
     127            max_packet_size, speed, data, size, callback, NULL, arg);
     128        if (!tracker)
     129                return ENOMEM;
     130        tracker_interrupt_in(tracker);
    131131        return EOK;
    132132}
     
    139139        dev_speed_t speed = FULL_SPEED;
    140140
    141         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    142             max_packet_size, speed, data, size, setup_data, setup_size,
    143             NULL, callback, arg);
    144         if (!batch)
    145                 return ENOMEM;
    146         batch_control_write(batch);
     141        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     142            max_packet_size, speed, data, size, NULL, callback, arg);
     143        if (!tracker)
     144                return ENOMEM;
     145        tracker_control_write(tracker, setup_data, setup_size);
    147146        return EOK;
    148147}
     
    155154        dev_speed_t speed = FULL_SPEED;
    156155
    157         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    158             max_packet_size, speed, data, size, setup_data, setup_size, callback,
    159             NULL, arg);
    160         if (!batch)
    161                 return ENOMEM;
    162         batch_control_read(batch);
     156        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     157            max_packet_size, speed, data, size, callback, NULL, arg);
     158        if (!tracker)
     159                return ENOMEM;
     160        tracker_control_read(tracker, setup_data, setup_size);
    163161        return EOK;
    164162}
     
    168166    usbhc_iface_transfer_out_callback_t callback, void *arg)
    169167{
    170         size_t max_packet_size = 8;
    171         dev_speed_t speed = FULL_SPEED;
    172 
    173         usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
    174         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    175             max_packet_size, speed, NULL, 0, data, size, NULL, callback, arg);
    176         if (!batch)
    177                 return ENOMEM;
    178         batch_control_setup_old(batch);
     168        usb_log_warning("Using deprecated API control write setup.\n");
     169        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     170            8, FULL_SPEED, data, size, NULL, callback, arg);
     171        if (!tracker)
     172                return ENOMEM;
     173        tracker_control_setup_old(tracker);
    179174        return EOK;
    180175}
     
    184179    usbhc_iface_transfer_out_callback_t callback, void *arg)
    185180{
    186         size_t max_packet_size = 8;
    187         dev_speed_t speed = FULL_SPEED;
    188 
    189         usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
    190         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    191             max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
    192         if (!batch)
    193                 return ENOMEM;
    194         batch_control_write_data_old(batch);
     181        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     182            size, FULL_SPEED, data, size, NULL, callback, arg);
     183        if (!tracker)
     184                return ENOMEM;
     185        tracker_control_write_data_old(tracker);
    195186        return EOK;
    196187}
     
    199190    usbhc_iface_transfer_in_callback_t callback, void *arg)
    200191{
    201         size_t max_packet_size = 8;
    202         dev_speed_t speed = FULL_SPEED;
    203 
    204         usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
    205         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    206             max_packet_size, speed, NULL, 0, NULL, 0, callback, NULL, arg);
    207         if (!batch)
    208                 return ENOMEM;
    209         batch_control_write_status_old(batch);
     192        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     193            0, FULL_SPEED, NULL, 0, callback, NULL, arg);
     194        if (!tracker)
     195                return ENOMEM;
     196        tracker_control_write_status_old(tracker);
    210197        return EOK;
    211198}
     
    215202    usbhc_iface_transfer_out_callback_t callback, void *arg)
    216203{
    217         size_t max_packet_size = 8;
    218         dev_speed_t speed = FULL_SPEED;
    219 
    220         usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
    221         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    222             max_packet_size, speed, NULL, 0, data, size, NULL, callback, arg);
    223         if (!batch)
    224                 return ENOMEM;
    225         batch_control_setup_old(batch);
     204        usb_log_warning("Using deprecated API control read setup.\n");
     205        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     206            8, FULL_SPEED, data, size, NULL, callback, arg);
     207        if (!tracker)
     208                return ENOMEM;
     209        tracker_control_setup_old(tracker);
    226210        return EOK;
    227211}
     
    231215    usbhc_iface_transfer_in_callback_t callback, void *arg)
    232216{
    233         size_t max_packet_size = 8;
    234         dev_speed_t speed = FULL_SPEED;
    235 
    236         usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
    237         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    238             max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg);
    239         if (!batch)
    240                 return ENOMEM;
    241         batch_control_read_data_old(batch);
     217        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     218            size, FULL_SPEED, data, size, callback, NULL, arg);
     219        if (!tracker)
     220                return ENOMEM;
     221        tracker_control_read_data_old(tracker);
    242222        return EOK;
    243223}
     
    246226    usbhc_iface_transfer_out_callback_t callback, void *arg)
    247227{
    248         size_t max_packet_size = 8;
    249         dev_speed_t speed = FULL_SPEED;
    250 
    251         usb_log_warning("Using deprecated API %s.\n", __FUNCTION__);
    252         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
    253             max_packet_size, speed, NULL, 0, NULL, 0, NULL, callback, arg);
    254         if (!batch)
    255                 return ENOMEM;
    256         batch_control_read_status_old(batch);
     228        tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL,
     229            0, FULL_SPEED, NULL, 0, NULL, callback, arg);
     230        if (!tracker)
     231                return ENOMEM;
     232        tracker_control_read_status_old(tracker);
    257233        return EOK;
    258234}
Note: See TracChangeset for help on using the changeset viewer.