Changeset c593b21 in mainline for uspace/drv/ohci/iface.c


Ignore:
Timestamp:
2011-04-03T18:06:29Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4e0b47
Parents:
0b4e7ca (diff), 0cec844 (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 development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/iface.c

    r0b4e7ca rc593b21  
    151151    size_t max_packet_size, unsigned int interval)
    152152{
    153         UNSUPPORTED("register_endpoint");
    154 
    155         return ENOTSUP;
     153        assert(fun);
     154        hc_t *hc = fun_to_hc(fun);
     155        assert(hc);
     156        if (address == hc->rh.address)
     157                return EOK;
     158        const usb_speed_t speed =
     159                usb_device_keeper_get_speed(&hc->manager, address);
     160        const size_t size = max_packet_size;
     161        usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
     162            address, endpoint, usb_str_transfer_type(transfer_type),
     163            usb_str_speed(speed), direction, size, max_packet_size, interval);
     164        return bandwidth_reserve(&hc->bandwidth, address, endpoint, direction,
     165            speed, transfer_type, max_packet_size, size, interval);
    156166}
    157167/*----------------------------------------------------------------------------*/
     
    168178    usb_endpoint_t endpoint, usb_direction_t direction)
    169179{
    170         UNSUPPORTED("unregister_endpoint");
     180        assert(fun);
     181        hc_t *hc = fun_to_hc(fun);
     182        assert(hc);
     183        usb_log_debug("Unregister endpoint %d:%d %d.\n",
     184            address, endpoint, direction);
     185        return bandwidth_release(&hc->bandwidth, address, endpoint, direction);
    171186
    172187        return ENOTSUP;
Note: See TracChangeset for help on using the changeset viewer.