Changeset c83a55c in mainline for uspace/drv/bus/usb/vhc/connhost.c
- Timestamp:
- 2011-10-31T06:52:54Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c25e39b
- Parents:
- e8ab32f (diff), 3ce78580 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/connhost.c
re8ab32f rc83a55c 104 104 { 105 105 VHC_DATA(vhc, fun); 106 bool found = 107 usb_device_manager_find_by_address(&vhc->dev_manager, address, handle); 108 return found ? EOK : ENOENT; 106 return usb_device_manager_get_info_by_address( 107 &vhc->dev_manager, address, handle, NULL); 109 108 } 110 109 … … 141 140 size_t max_packet_size, unsigned int interval) 142 141 { 143 /* TODO: Use usb_endpoint_manager_add_ep */ 144 VHC_DATA(vhc, fun); 145 146 endpoint_t *ep = endpoint_get( 147 address, endpoint, direction, transfer_type, USB_SPEED_FULL, 1); 148 if (ep == NULL) { 149 return ENOMEM; 150 } 151 152 int rc = usb_endpoint_manager_register_ep(&vhc->ep_manager, ep, 1); 153 if (rc != EOK) { 154 endpoint_destroy(ep); 155 return rc; 156 } 157 158 return EOK; 142 VHC_DATA(vhc, fun); 143 144 return usb_endpoint_manager_add_ep(&vhc->ep_manager, 145 address, endpoint, direction, transfer_type, USB_SPEED_FULL, 1, 0, 146 NULL, NULL); 147 159 148 } 160 149 … … 172 161 VHC_DATA(vhc, fun); 173 162 174 int rc = usb_endpoint_manager_ unregister_ep(&vhc->ep_manager,175 address, endpoint, direction );163 int rc = usb_endpoint_manager_remove_ep(&vhc->ep_manager, 164 address, endpoint, direction, NULL, NULL); 176 165 177 166 return rc; … … 414 403 VHC_DATA(vhc, fun); 415 404 416 endpoint_t *ep = usb_endpoint_manager_ get_ep(&vhc->ep_manager,417 target.address, target.endpoint, USB_DIRECTION_IN , NULL);405 endpoint_t *ep = usb_endpoint_manager_find_ep(&vhc->ep_manager, 406 target.address, target.endpoint, USB_DIRECTION_IN); 418 407 if (ep == NULL) { 419 408 return ENOENT; … … 456 445 VHC_DATA(vhc, fun); 457 446 458 endpoint_t *ep = usb_endpoint_manager_ get_ep(&vhc->ep_manager,459 target.address, target.endpoint, USB_DIRECTION_OUT , NULL);447 endpoint_t *ep = usb_endpoint_manager_find_ep(&vhc->ep_manager, 448 target.address, target.endpoint, USB_DIRECTION_OUT); 460 449 if (ep == NULL) { 461 450 return ENOENT; … … 518 507 519 508 usb_log_debug("tell_address_rh(handle=%" PRIun ")\n", handle); 520 usb_address_t addr = usb_device_manager_find(&vhc->dev_manager, handle); 509 const usb_address_t addr = 510 usb_device_manager_find_address(&vhc->dev_manager, handle); 521 511 if (addr < 0) { 522 512 return addr;
Note:
See TracChangeset
for help on using the changeset viewer.