Changes in uspace/drv/bus/usb/vhc/connhost.c [02fc5c4:48ae3ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/connhost.c
r02fc5c4 r48ae3ef 57 57 * @return Error code. 58 58 */ 59 static int request_address(ddf_fun_t *fun, usb_address_t *address, bool strict, 60 usb_speed_t speed) 61 { 62 VHC_DATA(vhc, fun); 63 64 assert(address); 65 return usb_device_manager_request_address( 66 &vhc->dev_manager, address, strict, speed); 59 static int request_address(ddf_fun_t *fun, usb_speed_t speed, 60 usb_address_t *address) 61 { 62 VHC_DATA(vhc, fun); 63 64 usb_address_t addr = usb_device_manager_get_free_address( 65 &vhc->dev_manager, USB_SPEED_HIGH); 66 if (addr < 0) { 67 return addr; 68 } 69 70 if (address != NULL) { 71 *address = addr; 72 } 73 74 return EOK; 67 75 } 68 76 … … 80 88 usb_log_debug("Binding handle %" PRIun " to address %d.\n", 81 89 handle, address); 82 usb_device_manager_bind _address(&vhc->dev_manager, address, handle);90 usb_device_manager_bind(&vhc->dev_manager, address, handle); 83 91 84 92 return EOK; … … 110 118 VHC_DATA(vhc, fun); 111 119 usb_log_debug("Releasing address %d...\n", address); 112 usb_device_manager_release _address(&vhc->dev_manager, address);120 usb_device_manager_release(&vhc->dev_manager, address); 113 121 114 122 return ENOTSUP; … … 128 136 */ 129 137 static int register_endpoint(ddf_fun_t *fun, 130 usb_address_t address, usb_ endpoint_t endpoint,138 usb_address_t address, usb_speed_t speed, usb_endpoint_t endpoint, 131 139 usb_transfer_type_t transfer_type, usb_direction_t direction, 132 140 size_t max_packet_size, unsigned int interval) … … 471 479 } 472 480 473 static int tell_address(ddf_fun_t *fun, usb_address_t *address) 481 static int tell_address(ddf_fun_t *fun, devman_handle_t handle, 482 usb_address_t *address) 474 483 { 475 484 UNSUPPORTED("tell_address"); … … 488 497 } 489 498 490 static int tell_address_rh(ddf_fun_t *root_hub_fun, usb_address_t *address) 499 static int tell_address_rh(ddf_fun_t *root_hub_fun, devman_handle_t handle, 500 usb_address_t *address) 491 501 { 492 502 VHC_DATA(vhc, root_hub_fun); 493 503 494 devman_handle_t handle = root_hub_fun->handle; 504 if (handle == 0) { 505 handle = root_hub_fun->handle; 506 } 495 507 496 508 usb_log_debug("tell_address_rh(handle=%" PRIun ")\n", handle); … … 508 520 .request_address = request_address, 509 521 .bind_address = bind_address, 510 . get_handle= find_by_address,522 .find_by_address = find_by_address, 511 523 .release_address = release_address, 512 524 … … 520 532 usb_iface_t vhc_usb_iface = { 521 533 .get_hc_handle = usb_iface_get_hc_handle_hc_impl, 522 .get_ my_address = tell_address534 .get_address = tell_address 523 535 }; 524 536 525 537 usb_iface_t rh_usb_iface = { 526 538 .get_hc_handle = usb_iface_get_hc_handle_rh_impl, 527 .get_ my_address = tell_address_rh539 .get_address = tell_address_rh 528 540 }; 529 541
Note:
See TracChangeset
for help on using the changeset viewer.