Ignore:
Timestamp:
2011-04-09T20:56:50Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba038f4
Parents:
8790650 (diff), 709e868 (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:

Development changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/host/device_keeper.c

    r8790650 r501e5df  
    5656                instance->devices[i].control_used = 0;
    5757                instance->devices[i].handle = 0;
     58                instance->devices[i].speed = USB_SPEED_MAX;
    5859                list_initialize(&instance->devices[i].endpoints);
    5960        }
     61        // TODO: is this hack enough?
     62        // (it is needed to allow smooth registration at default address)
     63        instance->devices[0].occupied = true;
    6064}
    6165/*----------------------------------------------------------------------------*/
     
    6771        assert(instance->devices[address].occupied);
    6872        list_append(&ep->same_device_eps, &instance->devices[address].endpoints);
     73        fibril_mutex_unlock(&instance->guard);
     74}
     75/*----------------------------------------------------------------------------*/
     76void usb_device_keeper_del_ep(
     77    usb_device_keeper_t *instance, usb_address_t address, endpoint_t *ep)
     78{
     79        assert(instance);
     80        fibril_mutex_lock(&instance->guard);
     81        assert(instance->devices[address].occupied);
     82        list_remove(&ep->same_device_eps);
     83        list_initialize(&ep->same_device_eps);
    6984        fibril_mutex_unlock(&instance->guard);
    7085}
Note: See TracChangeset for help on using the changeset viewer.