Changeset 357a302 in mainline for uspace/drv/usbhub/usbhub.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/usbhub/usbhub.c

    r3ae93a8 r357a302  
    3939
    4040#include <usb_iface.h>
     41#include <usb/ddfiface.h>
    4142#include <usb/usbdrv.h>
    4243#include <usb/descriptor.h>
     
    5051#include "usb/usb.h"
    5152
    52 static int iface_get_hc_handle(device_t *device, devman_handle_t *handle)
    53 {
    54         return usb_hc_find(device->handle, handle);
    55 }
    56 
    57 static usb_iface_t hub_usb_iface = {
    58         .get_hc_handle = iface_get_hc_handle
    59 };
    60 
    6153static device_ops_t hub_device_ops = {
    62         .interfaces[USB_DEV_IFACE] = &hub_usb_iface
     54        .interfaces[USB_DEV_IFACE] = &usb_iface_hub_impl
    6355};
    6456
Note: See TracChangeset for help on using the changeset viewer.