Changeset c83a55c in mainline for uspace/drv/bus/usb/vhc/connhost.c


Ignore:
Timestamp:
2011-10-31T06:52:54Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
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.
Message:

Merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/connhost.c

    re8ab32f rc83a55c  
    104104{
    105105        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);
    109108}
    110109
     
    141140    size_t max_packet_size, unsigned int interval)
    142141{
    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
    159148}
    160149
     
    172161        VHC_DATA(vhc, fun);
    173162
    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);
    176165
    177166        return rc;
     
    414403        VHC_DATA(vhc, fun);
    415404
    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);
    418407        if (ep == NULL) {
    419408                return ENOENT;
     
    456445        VHC_DATA(vhc, fun);
    457446
    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);
    460449        if (ep == NULL) {
    461450                return ENOENT;
     
    518507
    519508        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);
    521511        if (addr < 0) {
    522512                return addr;
Note: See TracChangeset for help on using the changeset viewer.