Changeset 8870230 in mainline


Ignore:
Timestamp:
2011-04-01T15:57:34Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
857edac
Parents:
da9ebca
Message:

Remove useless parameters from bandwidth reservation API.
Add UHCI bandwidth reservation stubs

Location:
uspace
Files:
3 edited

Legend:

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

    rda9ebca r8870230  
    128128}
    129129/*----------------------------------------------------------------------------*/
     130static int register_endpoint(
     131    ddf_fun_t *fun, usb_address_t address, usb_endpoint_t endpoint,
     132    usb_transfer_type_t transfer_type, usb_direction_t direction,
     133    size_t max_packet_size, unsigned int interval)
     134{
     135        return ENOTSUP;
     136}
     137/*----------------------------------------------------------------------------*/
     138static int unregister_endpoint(
     139    ddf_fun_t *fun, usb_address_t address,
     140    usb_endpoint_t endpoint, usb_direction_t direction)
     141{
     142        return ENOTSUP;
     143}
     144/*----------------------------------------------------------------------------*/
    130145/** Interrupt out transaction interface function
    131146 *
     
    365380        .release_address = release_address,
    366381
     382        .register_endpoint = register_endpoint,
     383        .unregister_endpoint = unregister_endpoint,
     384
    367385        .interrupt_out = interrupt_out,
    368386        .interrupt_in = interrupt_in,
  • uspace/lib/usb/include/usb/host/bandwidth.h

    rda9ebca r8870230  
    5555
    5656int bandwidth_reserve(bandwidth_t *instance, usb_address_t address,
    57     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    58     size_t max_packet_size, size_t size, unsigned interval);
     57    usb_endpoint_t endpoint, usb_direction_t direction, usb_speed_t speed,
     58    usb_transfer_type_t transfer_type, size_t max_packet_size, size_t size,
     59    unsigned interval);
    5960
    6061int bandwidth_release(bandwidth_t *instance, usb_address_t address,
    61     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    62     size_t max_packet_size, size_t size, unsigned interval);
     62    usb_endpoint_t endpoint, usb_direction_t direction);
    6363
    6464int bandwidth_use(bandwidth_t *instance, usb_address_t address,
    65     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    66     size_t max_packet_size, size_t size, unsigned interval);
     65    usb_endpoint_t endpoint, usb_direction_t direction);
    6766
    6867int bandwidth_free(bandwidth_t *instance, usb_address_t address,
    69     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    70     size_t max_packet_size, size_t size, unsigned interval);
     68    usb_endpoint_t endpoint, usb_direction_t direction);
    7169
    7270#endif
  • uspace/lib/usb/src/host/bandwidth.c

    rda9ebca r8870230  
    3434        usb_address_t address;
    3535        usb_endpoint_t endpoint;
    36         usb_transfer_type_t transfer_type;
    37         size_t max_packet_size;
    38         size_t size;
     36        usb_direction_t direction;
    3937} __attribute__((aligned (sizeof(unsigned long)))) transfer_t;
    4038/*----------------------------------------------------------------------------*/
     
    4341        link_t link;
    4442        bool used;
     43        size_t required;
    4544} transfer_status_t;
    4645/*----------------------------------------------------------------------------*/
     
    9190/*----------------------------------------------------------------------------*/
    9291int bandwidth_reserve(bandwidth_t *instance, usb_address_t address,
    93     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    94     size_t max_packet_size, size_t size, unsigned interval)
    95 {
    96         assert(instance);
    97         transfer_t trans = {
    98                 .address = address,
    99                 .endpoint = endpoint,
    100                 .transfer_type = transfer_type,
    101                 .max_packet_size = max_packet_size,
    102                 .size = size,
     92    usb_endpoint_t endpoint, usb_direction_t direction, usb_speed_t speed,
     93    usb_transfer_type_t transfer_type, size_t max_packet_size, size_t size,
     94    unsigned interval)
     95{
     96        assert(instance);
     97        transfer_t trans = {
     98                .address = address,
     99                .endpoint = endpoint,
     100                .direction = direction,
    103101        };
    104102        fibril_mutex_lock(&instance->guard);
     
    117115
    118116        status->transfer = trans;
     117        status->required = 0;
    119118        status->used = false;
    120119        link_initialize(&status->link);
     
    128127/*----------------------------------------------------------------------------*/
    129128int bandwidth_release(bandwidth_t *instance, usb_address_t address,
    130     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    131     size_t max_packet_size, size_t size, unsigned interval)
    132 {
    133         assert(instance);
    134         transfer_t trans = {
    135                 .address = address,
    136                 .endpoint = endpoint,
    137                 .transfer_type = transfer_type,
    138                 .max_packet_size = max_packet_size,
    139                 .size = size,
     129    usb_endpoint_t endpoint, usb_direction_t direction)
     130{
     131        assert(instance);
     132        transfer_t trans = {
     133                .address = address,
     134                .endpoint = endpoint,
     135                .direction = direction,
    140136        };
    141137        fibril_mutex_lock(&instance->guard);
     
    156152/*----------------------------------------------------------------------------*/
    157153int bandwidth_use(bandwidth_t *instance, usb_address_t address,
    158     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    159     size_t max_packet_size, size_t size, unsigned interval)
    160 {
    161         assert(instance);
    162         transfer_t trans = {
    163                 .address = address,
    164                 .endpoint = endpoint,
    165                 .transfer_type = transfer_type,
    166                 .max_packet_size = max_packet_size,
    167                 .size = size,
     154    usb_endpoint_t endpoint, usb_direction_t direction)
     155{
     156        assert(instance);
     157        transfer_t trans = {
     158                .address = address,
     159                .endpoint = endpoint,
     160                .direction = direction,
    168161        };
    169162        fibril_mutex_lock(&instance->guard);
     
    187180/*----------------------------------------------------------------------------*/
    188181int bandwidth_free(bandwidth_t *instance, usb_address_t address,
    189     usb_endpoint_t endpoint, usb_transfer_type_t transfer_type,
    190     size_t max_packet_size, size_t size, unsigned interval)
    191 {
    192         assert(instance);
    193         transfer_t trans = {
    194                 .address = address,
    195                 .endpoint = endpoint,
    196                 .transfer_type = transfer_type,
    197                 .max_packet_size = max_packet_size,
    198                 .size = size,
     182    usb_endpoint_t endpoint, usb_direction_t direction)
     183{
     184        assert(instance);
     185        transfer_t trans = {
     186                .address = address,
     187                .endpoint = endpoint,
     188                .direction = direction,
    199189        };
    200190        fibril_mutex_lock(&instance->guard);
Note: See TracChangeset for help on using the changeset viewer.