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