Changes in uspace/drv/uhci-hcd/iface.c [1998bcd:52cc968] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r1998bcd r52cc968 74 74 name, target.address, target.endpoint, size, ep->max_packet_size); 75 75 76 //assert(ep->speed ==77 //usb_device_keeper_get_speed(&(*hc)->manager, target.address));76 assert(ep->speed == 77 usb_device_keeper_get_speed(&(*hc)->manager, target.address)); 78 78 // assert(ep->max_packet_size == max_packet_size); 79 79 // assert(ep->transfer_type == USB_TRANSFER_CONTROL); … … 198 198 /*----------------------------------------------------------------------------*/ 199 199 static int register_endpoint( 200 ddf_fun_t *fun, usb_address_t address, usb_speed_t ep_speed, 201 usb_endpoint_t endpoint, 200 ddf_fun_t *fun, usb_address_t address, usb_endpoint_t endpoint, 202 201 usb_transfer_type_t transfer_type, usb_direction_t direction, 203 202 size_t max_packet_size, unsigned int interval) … … 205 204 hc_t *hc = fun_to_hc(fun); 206 205 assert(hc); 207 usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address); 208 if (speed >= USB_SPEED_MAX) { 209 speed = ep_speed; 210 } 206 const usb_speed_t speed = 207 usb_device_keeper_get_speed(&hc->manager, address); 211 208 const size_t size = 212 209 (transfer_type == USB_TRANSFER_INTERRUPT … … 246 243 usb_log_debug("Unregister endpoint %d:%d %d.\n", 247 244 address, endpoint, direction); 248 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,249 address, endpoint, direction, NULL);250 if (ep != NULL) {251 usb_device_keeper_del_ep(&hc->manager, address, ep);252 }253 245 return usb_endpoint_manager_unregister_ep(&hc->ep_manager, address, 254 246 endpoint, direction); … … 259 251 * @param[in] fun DDF function that was called. 260 252 * @param[in] target USB device to write to. 253 * @param[in] max_packet_size maximum size of data packet the device accepts 261 254 * @param[in] data Source of data. 262 255 * @param[in] size Size of data source. … … 266 259 */ 267 260 static int interrupt_out( 268 ddf_fun_t *fun, usb_target_t target, void *data,261 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size, void *data, 269 262 size_t size, usbhc_iface_transfer_out_callback_t callback, void *arg) 270 263 { … … 287 280 * @param[in] fun DDF function that was called. 288 281 * @param[in] target USB device to write to. 282 * @param[in] max_packet_size maximum size of data packet the device accepts 289 283 * @param[out] data Data destination. 290 284 * @param[in] size Size of data source. … … 294 288 */ 295 289 static int interrupt_in( 296 ddf_fun_t *fun, usb_target_t target, void *data,290 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size, void *data, 297 291 size_t size, usbhc_iface_transfer_in_callback_t callback, void *arg) 298 292 { … … 315 309 * @param[in] fun DDF function that was called. 316 310 * @param[in] target USB device to write to. 311 * @param[in] max_packet_size maximum size of data packet the device accepts 317 312 * @param[in] data Source of data. 318 313 * @param[in] size Size of data source. … … 322 317 */ 323 318 static int bulk_out( 324 ddf_fun_t *fun, usb_target_t target, void *data,319 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size, void *data, 325 320 size_t size, usbhc_iface_transfer_out_callback_t callback, void *arg) 326 321 { … … 343 338 * @param[in] fun DDF function that was called. 344 339 * @param[in] target USB device to write to. 340 * @param[in] max_packet_size maximum size of data packet the device accepts 345 341 * @param[out] data Data destination. 346 342 * @param[in] size Size of data source. … … 350 346 */ 351 347 static int bulk_in( 352 ddf_fun_t *fun, usb_target_t target, void *data,348 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size, void *data, 353 349 size_t size, usbhc_iface_transfer_in_callback_t callback, void *arg) 354 350 { … … 371 367 * @param[in] fun DDF function that was called. 372 368 * @param[in] target USB device to write to. 369 * @param[in] max_packet_size maximum size of data packet the device accepts. 373 370 * @param[in] setup_data Data to send with SETUP transfer. 374 371 * @param[in] setup_size Size of data to send with SETUP transfer (always 8B). … … 380 377 */ 381 378 static int control_write( 382 ddf_fun_t *fun, usb_target_t target, 379 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size, 383 380 void *setup_data, size_t setup_size, void *data, size_t size, 384 381 usbhc_iface_transfer_out_callback_t callback, void *arg) … … 404 401 * @param[in] fun DDF function that was called. 405 402 * @param[in] target USB device to write to. 403 * @param[in] max_packet_size maximum size of data packet the device accepts. 406 404 * @param[in] setup_data Data to send with SETUP packet. 407 405 * @param[in] setup_size Size of data to send with SETUP packet (should be 8B). … … 413 411 */ 414 412 static int control_read( 415 ddf_fun_t *fun, usb_target_t target, 413 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size, 416 414 void *setup_data, size_t setup_size, void *data, size_t size, 417 415 usbhc_iface_transfer_in_callback_t callback, void *arg)
Note:
See TracChangeset
for help on using the changeset viewer.