Ignore:
File:
1 edited

Legend:

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

    r61bb85d r83c439c  
    109109        dev_speed_t speed = FULL_SPEED;
    110110
    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);
     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);
    116116        return EOK;
    117117}
     
    124124        dev_speed_t speed = FULL_SPEED;
    125125
    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);
     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);
    131131        return EOK;
    132132}
     
    139139        dev_speed_t speed = FULL_SPEED;
    140140
    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);
     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);
    146147        return EOK;
    147148}
     
    154155        dev_speed_t speed = FULL_SPEED;
    155156
    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);
     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);
    161163        return EOK;
    162164}
     
    166168    usbhc_iface_transfer_out_callback_t callback, void *arg)
    167169{
    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);
     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);
    174179        return EOK;
    175180}
     
    179184    usbhc_iface_transfer_out_callback_t callback, void *arg)
    180185{
    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);
     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);
    186195        return EOK;
    187196}
     
    190199    usbhc_iface_transfer_in_callback_t callback, void *arg)
    191200{
    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);
     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);
    197210        return EOK;
    198211}
     
    202215    usbhc_iface_transfer_out_callback_t callback, void *arg)
    203216{
    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);
     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);
    210226        return EOK;
    211227}
     
    215231    usbhc_iface_transfer_in_callback_t callback, void *arg)
    216232{
    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);
     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);
    222242        return EOK;
    223243}
     
    226246    usbhc_iface_transfer_out_callback_t callback, void *arg)
    227247{
    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);
     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);
    233257        return EOK;
    234258}
Note: See TracChangeset for help on using the changeset viewer.