Changes in uspace/drv/uhci-hcd/iface.c [61bb85d:83c439c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r61bb85d r83c439c 109 109 dev_speed_t speed = FULL_SPEED; 110 110 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); 116 116 return EOK; 117 117 } … … 124 124 dev_speed_t speed = FULL_SPEED; 125 125 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); 131 131 return EOK; 132 132 } … … 139 139 dev_speed_t speed = FULL_SPEED; 140 140 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); 146 147 return EOK; 147 148 } … … 154 155 dev_speed_t speed = FULL_SPEED; 155 156 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); 161 163 return EOK; 162 164 } … … 166 168 usbhc_iface_transfer_out_callback_t callback, void *arg) 167 169 { 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); 174 179 return EOK; 175 180 } … … 179 184 usbhc_iface_transfer_out_callback_t callback, void *arg) 180 185 { 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); 186 195 return EOK; 187 196 } … … 190 199 usbhc_iface_transfer_in_callback_t callback, void *arg) 191 200 { 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); 197 210 return EOK; 198 211 } … … 202 215 usbhc_iface_transfer_out_callback_t callback, void *arg) 203 216 { 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); 210 226 return EOK; 211 227 } … … 215 231 usbhc_iface_transfer_in_callback_t callback, void *arg) 216 232 { 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); 222 242 return EOK; 223 243 } … … 226 246 usbhc_iface_transfer_out_callback_t callback, void *arg) 227 247 { 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); 233 257 return EOK; 234 258 }
Note:
See TracChangeset
for help on using the changeset viewer.