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


Ignore:
Timestamp:
2011-02-20T14:17:40Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b68b279
Parents:
3ae93a8
Message:

USB interfaces reorganization

The most important change is that getting USB address of a device
is an operation of generic USB interface, not USB-HC interface.
That is needed for proper functionality of a MID driver.

Also added sample implementation of USB interface operations as is
needed by most drivers (sample does not mean unfunctional or partially
implemented here).
They are stored in libusb/ddfiface.h

Updated UHCI, UHCI-RH, hub, VHC drivers to use these sample
implementations.

Updated libusb device recognition routines to route get_address requests
through USB interface.

File:
1 edited

Legend:

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

    r3ae93a8 r357a302  
    4242#include "uhci.h"
    4343
    44 static int get_address(device_t *dev, devman_handle_t handle,
    45     usb_address_t *address)
    46 {
    47         assert(dev);
    48         uhci_t *hc = dev_to_uhci(dev);
    49         assert(hc);
    50         *address = usb_address_keeping_find(&hc->address_manager, handle);
    51         if (*address <= 0)
    52           return *address;
    53         return EOK;
    54 }
    5544/*----------------------------------------------------------------------------*/
    5645static int reserve_default_address(device_t *dev, usb_speed_t speed)
     
    168157/*----------------------------------------------------------------------------*/
    169158usbhc_iface_t uhci_iface = {
    170         .tell_address = get_address,
    171 
    172159        .reserve_default_address = reserve_default_address,
    173160        .release_default_address = release_default_address,
Note: See TracChangeset for help on using the changeset viewer.