Changeset bbdf09e in mainline


Ignore:
Timestamp:
2011-04-22T16:35:45Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c709eb0
Parents:
4125b7d
Message:

Virtual host controller works again

Added dummy implementation of endpoint registration and fixed
problem with tell_device_address callback.

File:
1 edited

Legend:

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

    r4125b7d rbbdf09e  
    313313    usb_address_t *address)
    314314{
    315         usb_log_debug("tell_address(fun \"%s\", handle %zu)\n",
    316             fun->name, (size_t) fun->handle);
     315        usb_log_debug(
     316            "tell_address(fun=`%s' (%" PRIun"), dev_handle=%" PRIun ")\n",
     317            fun->name, fun->handle, handle);
    317318        usb_address_t addr = usb_address_keeping_find(&addresses, handle);
    318319        if (addr < 0) {
     
    341342}
    342343
     344static int register_endpoint(ddf_fun_t *fun,
     345    usb_address_t address, usb_speed_t speed, usb_endpoint_t endpoint,
     346    usb_transfer_type_t transfer_type, usb_direction_t direction,
     347    size_t max_packet_size, unsigned int interval)
     348{
     349        if ((address == USB_ADDRESS_DEFAULT)
     350            && (endpoint == 0)) {
     351                usb_address_keeping_reserve_default(&addresses);
     352        }
     353
     354        return EOK;
     355}
     356
     357static int unregister_endpoint(ddf_fun_t *fun, usb_address_t address,
     358    usb_endpoint_t endpoint, usb_direction_t direction)
     359{
     360        if ((address == USB_ADDRESS_DEFAULT)
     361            && (endpoint == 0)) {
     362                usb_address_keeping_release_default(&addresses);
     363        }
     364
     365        return EOK;
     366}
     367
     368
    343369static int bind_address(ddf_fun_t *fun, usb_address_t address,
    344370    devman_handle_t handle)
     
    367393        assert(hc_fun != NULL);
    368394
    369         return tell_address(hc_fun, root_hub_fun->handle, address);
     395        if (handle == 0) {
     396                handle = root_hub_fun->handle;
     397        }
     398
     399        return tell_address(hc_fun, handle, address);
    370400}
    371401
     
    380410        .release_address = release_address,
    381411
     412        .register_endpoint = register_endpoint,
     413        .unregister_endpoint = unregister_endpoint,
     414
    382415        .interrupt_out = interrupt_out,
    383416        .interrupt_in = interrupt_in,
Note: See TracChangeset for help on using the changeset viewer.