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


Ignore:
Timestamp:
2011-12-18T14:02:30Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c868e2d
Parents:
3b71e84d (diff), 1761268 (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 mainline changes.

File:
1 edited

Legend:

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

    r3b71e84d r7aaed09  
    5757 * @return Error code.
    5858 */
    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;
     59static 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);
    7567}
    7668
     
    8880        usb_log_debug("Binding handle %" PRIun " to address %d.\n",
    8981            handle, address);
    90         usb_device_manager_bind(&vhc->dev_manager, address, handle);
     82        usb_device_manager_bind_address(&vhc->dev_manager, address, handle);
    9183
    9284        return EOK;
     
    118110        VHC_DATA(vhc, fun);
    119111        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);
    121113
    122114        return ENOTSUP;
     
    136128 */
    137129static 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,
    139131    usb_transfer_type_t transfer_type, usb_direction_t direction,
    140132    size_t max_packet_size, unsigned int interval)
     
    479471}
    480472
    481 static int tell_address(ddf_fun_t *fun, devman_handle_t handle,
    482     usb_address_t *address)
     473static int tell_address(ddf_fun_t *fun, usb_address_t *address)
    483474{
    484475        UNSUPPORTED("tell_address");
     
    497488}
    498489
    499 static int tell_address_rh(ddf_fun_t *root_hub_fun, devman_handle_t handle,
    500     usb_address_t *address)
     490static int tell_address_rh(ddf_fun_t *root_hub_fun, usb_address_t *address)
    501491{
    502492        VHC_DATA(vhc, root_hub_fun);
    503493
    504         if (handle == 0) {
    505                 handle = root_hub_fun->handle;
    506         }
     494        devman_handle_t handle = root_hub_fun->handle;
    507495
    508496        usb_log_debug("tell_address_rh(handle=%" PRIun ")\n", handle);
     
    520508        .request_address = request_address,
    521509        .bind_address = bind_address,
    522         .find_by_address = find_by_address,
     510        .get_handle = find_by_address,
    523511        .release_address = release_address,
    524512
     
    532520usb_iface_t vhc_usb_iface = {
    533521        .get_hc_handle = usb_iface_get_hc_handle_hc_impl,
    534         .get_address = tell_address
     522        .get_my_address = tell_address
    535523};
    536524
    537525usb_iface_t rh_usb_iface = {
    538526        .get_hc_handle = usb_iface_get_hc_handle_rh_impl,
    539         .get_address = tell_address_rh
     527        .get_my_address = tell_address_rh
    540528};
    541529
Note: See TracChangeset for help on using the changeset viewer.