Changeset 7dfc06fa in mainline for uspace/drv/uhci-hcd/iface.c
- Timestamp:
- 2011-04-08T18:08:46Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c6cb76d
- Parents:
- c1b1944
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
rc1b1944 r7dfc06fa 204 204 * @param[in] fun DDF function that was called. 205 205 * @param[in] target USB device to write to. 206 * @param[in] max_packet_size maximum size of data packet the device accepts207 206 * @param[in] data Source of data. 208 207 * @param[in] size Size of data source. … … 212 211 */ 213 212 static int interrupt_out( 214 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,213 ddf_fun_t *fun, usb_target_t target, void *data, 215 214 size_t size, usbhc_iface_transfer_out_callback_t callback, void *arg) 216 215 { … … 219 218 assert(hc); 220 219 221 usb_log_debug("Interrupt OUT %d:%d %zu (%zu).\n",222 target.address, target.endpoint, size , max_packet_size);220 usb_log_debug("Interrupt OUT %d:%d %zu.\n", 221 target.address, target.endpoint, size); 223 222 224 223 size_t res_bw; … … 241 240 assert(ep->speed == 242 241 usb_device_keeper_get_speed(&hc->manager, target.address)); 243 assert(ep->max_packet_size == max_packet_size);244 242 assert(ep->transfer_type == USB_TRANSFER_INTERRUPT); 245 243 … … 261 259 * @param[in] fun DDF function that was called. 262 260 * @param[in] target USB device to write to. 263 * @param[in] max_packet_size maximum size of data packet the device accepts264 261 * @param[out] data Data destination. 265 262 * @param[in] size Size of data source. … … 269 266 */ 270 267 static int interrupt_in( 271 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,268 ddf_fun_t *fun, usb_target_t target, void *data, 272 269 size_t size, usbhc_iface_transfer_in_callback_t callback, void *arg) 273 270 { … … 276 273 assert(hc); 277 274 278 usb_log_debug("Interrupt IN %d:%d %zu (%zu).\n",279 target.address, target.endpoint, size , max_packet_size);275 usb_log_debug("Interrupt IN %d:%d %zu.\n", 276 target.address, target.endpoint, size); 280 277 281 278 size_t res_bw; … … 299 296 assert(ep->speed == 300 297 usb_device_keeper_get_speed(&hc->manager, target.address)); 301 assert(ep->max_packet_size == max_packet_size);302 298 assert(ep->transfer_type == USB_TRANSFER_INTERRUPT); 303 299 … … 319 315 * @param[in] fun DDF function that was called. 320 316 * @param[in] target USB device to write to. 321 * @param[in] max_packet_size maximum size of data packet the device accepts322 317 * @param[in] data Source of data. 323 318 * @param[in] size Size of data source. … … 327 322 */ 328 323 static int bulk_out( 329 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,324 ddf_fun_t *fun, usb_target_t target, void *data, 330 325 size_t size, usbhc_iface_transfer_out_callback_t callback, void *arg) 331 326 { … … 334 329 assert(hc); 335 330 336 usb_log_debug("Bulk OUT %d:%d %zu (%zu).\n",337 target.address, target.endpoint, size , max_packet_size);331 usb_log_debug("Bulk OUT %d:%d %zu.\n", 332 target.address, target.endpoint, size); 338 333 339 334 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, … … 346 341 assert(ep->speed == 347 342 usb_device_keeper_get_speed(&hc->manager, target.address)); 348 assert(ep->max_packet_size == max_packet_size);349 343 assert(ep->transfer_type == USB_TRANSFER_BULK); 350 344 … … 366 360 * @param[in] fun DDF function that was called. 367 361 * @param[in] target USB device to write to. 368 * @param[in] max_packet_size maximum size of data packet the device accepts369 362 * @param[out] data Data destination. 370 363 * @param[in] size Size of data source. … … 374 367 */ 375 368 static int bulk_in( 376 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,void *data,369 ddf_fun_t *fun, usb_target_t target, void *data, 377 370 size_t size, usbhc_iface_transfer_in_callback_t callback, void *arg) 378 371 { … … 380 373 hc_t *hc = fun_to_hc(fun); 381 374 assert(hc); 382 usb_log_debug("Bulk IN %d:%d %zu (%zu).\n",383 target.address, target.endpoint, size , max_packet_size);375 usb_log_debug("Bulk IN %d:%d %zu.\n", 376 target.address, target.endpoint, size); 384 377 385 378 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, … … 392 385 assert(ep->speed == 393 386 usb_device_keeper_get_speed(&hc->manager, target.address)); 394 assert(ep->max_packet_size == max_packet_size);395 387 assert(ep->transfer_type == USB_TRANSFER_BULK); 396 388 … … 412 404 * @param[in] fun DDF function that was called. 413 405 * @param[in] target USB device to write to. 414 * @param[in] max_packet_size maximum size of data packet the device accepts.415 406 * @param[in] setup_data Data to send with SETUP transfer. 416 407 * @param[in] setup_size Size of data to send with SETUP transfer (always 8B). … … 422 413 */ 423 414 static int control_write( 424 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,415 ddf_fun_t *fun, usb_target_t target, 425 416 void *setup_data, size_t setup_size, void *data, size_t size, 426 417 usbhc_iface_transfer_out_callback_t callback, void *arg) … … 431 422 usb_speed_t speed = 432 423 usb_device_keeper_get_speed(&hc->manager, target.address); 433 usb_log_debug("Control WRITE (%d) %d:%d %zu (%zu).\n",434 speed, target.address, target.endpoint, size , max_packet_size);424 usb_log_debug("Control WRITE (%d) %d:%d %zu.\n", 425 speed, target.address, target.endpoint, size); 435 426 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, 436 427 target.address, target.endpoint, USB_DIRECTION_BOTH, NULL); … … 444 435 445 436 usb_transfer_batch_t *batch = 446 batch_get(fun, target, USB_TRANSFER_CONTROL, max_packet_size, speed,437 batch_get(fun, target, USB_TRANSFER_CONTROL, ep->max_packet_size, speed, 447 438 data, size, setup_data, setup_size, NULL, callback, arg, ep); 448 439 if (!batch) … … 461 452 * @param[in] fun DDF function that was called. 462 453 * @param[in] target USB device to write to. 463 * @param[in] max_packet_size maximum size of data packet the device accepts.464 454 * @param[in] setup_data Data to send with SETUP packet. 465 455 * @param[in] setup_size Size of data to send with SETUP packet (should be 8B). … … 471 461 */ 472 462 static int control_read( 473 ddf_fun_t *fun, usb_target_t target, size_t max_packet_size,463 ddf_fun_t *fun, usb_target_t target, 474 464 void *setup_data, size_t setup_size, void *data, size_t size, 475 465 usbhc_iface_transfer_in_callback_t callback, void *arg) … … 481 471 usb_device_keeper_get_speed(&hc->manager, target.address); 482 472 483 usb_log_debug("Control READ(%d) %d:%d %zu (%zu).\n",484 speed, target.address, target.endpoint, size , max_packet_size);473 usb_log_debug("Control READ(%d) %d:%d %zu.\n", 474 speed, target.address, target.endpoint, size); 485 475 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, 486 476 target.address, target.endpoint, USB_DIRECTION_BOTH, NULL); … … 490 480 } 491 481 usb_transfer_batch_t *batch = 492 batch_get(fun, target, USB_TRANSFER_CONTROL, max_packet_size, speed,482 batch_get(fun, target, USB_TRANSFER_CONTROL, ep->max_packet_size, speed, 493 483 data, size, setup_data, setup_size, callback, NULL, arg, ep); 494 484 if (!batch)
Note:
See TracChangeset
for help on using the changeset viewer.