Changeset a1313b8c in mainline for uspace/drv/uhci-hcd/iface.c


Ignore:
Timestamp:
2011-04-02T14:41:12Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1273b86c
Parents:
4ab89e5
Message:

Implement hc bandwidth reservation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/iface.c

    r4ab89e5 ra1313b8c  
    133133    size_t max_packet_size, unsigned int interval)
    134134{
    135         return ENOTSUP;
     135        hc_t *hc = fun_to_hc(fun);
     136        assert(hc);
     137        const usb_speed_t speed =
     138            usb_device_keeper_get_speed(&hc->manager, address);
     139        size_t size = max_packet_size;
     140
     141        usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
     142            address, endpoint, usb_str_transfer_type(transfer_type),
     143            usb_str_speed(speed), direction, size, max_packet_size, interval);
     144        return bandwidth_reserve(&hc->bandwidth, address, endpoint, direction,
     145            speed, transfer_type, max_packet_size, size, interval);
    136146}
    137147/*----------------------------------------------------------------------------*/
     
    140150    usb_endpoint_t endpoint, usb_direction_t direction)
    141151{
    142         return ENOTSUP;
     152        hc_t *hc = fun_to_hc(fun);
     153        assert(hc);
     154        usb_log_debug("Unregister endpoint %d:%d %d.\n",
     155            address, endpoint, direction);
     156        return bandwidth_release(&hc->bandwidth, address, endpoint, direction);
    143157}
    144158/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.