Changeset 357a302 in mainline for uspace/drv/vhc/hcd.c


Ignore:
Timestamp:
2011-02-20T14:17:40Z (13 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/vhc/hcd.c

    r3ae93a8 r357a302  
    4545
    4646#include <usb/usb.h>
     47#include <usb/ddfiface.h>
    4748#include <usb_iface.h>
    4849#include "vhcd.h"
     
    5253#include "conn.h"
    5354
    54 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle)
    55 {
    56         /* This shall be called only for VHC device. */
    57         assert(dev->parent == NULL);
    58 
    59         *handle = dev->handle;
    60         return EOK;
    61 }
    62 
    63 static usb_iface_t hc_usb_iface = {
    64         .get_hc_handle = usb_iface_get_hc_handle
    65 };
    66 
    6755static device_ops_t vhc_ops = {
    6856        .interfaces[USBHC_DEV_IFACE] = &vhc_iface,
    69         .interfaces[USB_DEV_IFACE] = &hc_usb_iface,
     57        .interfaces[USB_DEV_IFACE] = &vhc_usb_iface,
    7058        .close = on_client_close,
    7159        .default_handler = default_connection_handler
Note: See TracChangeset for help on using the changeset viewer.