Changeset 5876d36 in mainline


Ignore:
Timestamp:
2011-04-06T18:36:33Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88dd355
Parents:
391d55b
Message:

OHCI uses usb_endpoint_manager

removed old bandwidth_t

Location:
uspace
Files:
2 deleted
4 edited

Legend:

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

    r391d55b r5876d36  
    9292        instance->ddf_instance = fun;
    9393        usb_device_keeper_init(&instance->manager);
    94         ret = bandwidth_init(&instance->bandwidth, BANDWIDTH_AVAILABLE_USB11,
    95             bandwidth_count_usb11);
    96         CHECK_RET_RETURN(ret, "Failed to initialize bandwidth allocator: %s.\n",
     94        ret = usb_endpoint_manager_init(&instance->ep_manager,
     95            BANDWIDTH_AVAILABLE_USB11);
     96        CHECK_RET_RETURN(ret, "Failed to initialize endpoint manager: %s.\n",
    9797            ret, str_error(ret));
    9898
  • uspace/drv/ohci/hc.h

    r391d55b r5876d36  
    4242#include <usb/usb.h>
    4343#include <usb/host/device_keeper.h>
    44 #include <usb/host/bandwidth.h>
     44#include <usb/host/usb_endpoint_manager.h>
    4545#include <usbhc_iface.h>
    4646
     
    5555        ddf_fun_t *ddf_instance;
    5656        usb_device_keeper_t manager;
    57         bandwidth_t bandwidth;
     57        usb_endpoint_manager_t ep_manager;
    5858        fid_t interrupt_emulator;
    5959} hc_t;
  • uspace/drv/ohci/iface.c

    r391d55b r5876d36  
    162162            address, endpoint, usb_str_transfer_type(transfer_type),
    163163            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);
     164        // TODO use real endpoint here!
     165        return usb_endpoint_manager_register_ep(&hc->ep_manager,
     166            address, endpoint, direction, NULL, NULL, 0);
    166167}
    167168/*----------------------------------------------------------------------------*/
     
    183184        usb_log_debug("Unregister endpoint %d:%d %d.\n",
    184185            address, endpoint, direction);
    185         return bandwidth_release(&hc->bandwidth, address, endpoint, direction);
    186 
    187         return ENOTSUP;
     186        return usb_endpoint_manager_unregister_ep(&hc->ep_manager, address,
     187            endpoint, direction);
    188188}
    189189/*----------------------------------------------------------------------------*/
  • uspace/lib/usb/Makefile

    r391d55b r5876d36  
    5454        src/host/device_keeper.c \
    5555        src/host/batch.c \
    56         src/host/bandwidth.c \
    5756        src/host/usb_endpoint_manager.c
    5857
Note: See TracChangeset for help on using the changeset viewer.