Changeset 0f191a2 in mainline for uspace/drv/vhc/hcd.c


Ignore:
Timestamp:
2011-01-07T09:20:13Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2b0db98, 2c98e78, 43c3937
Parents:
ae1f70e (diff), 8f8a0cd6 (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:

Merged vojtechhorky/ - connecting to HC

Fixed ticket #6:
Currently, all USB device drivers connect to the virtual host
controller. The usb_drv_hc_connect() function must connect
the caller to the host controller driver the device is
physically attached to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hcd.c

    rae1f70e r0f191a2  
    4646
    4747#include <usb/usb.h>
     48#include <usb_iface.h>
    4849#include "vhcd.h"
    4950#include "hc.h"
     
    5253#include "conn.h"
    5354
     55static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle)
     56{
     57        /* This shall be called only for VHC device. */
     58        assert(dev->parent == NULL);
     59
     60        *handle = dev->handle;
     61        return EOK;
     62}
     63
     64static usb_iface_t hc_usb_iface = {
     65        .get_hc_handle = usb_iface_get_hc_handle
     66};
     67
    5468static device_ops_t vhc_ops = {
    5569        .interfaces[USBHC_DEV_IFACE] = &vhc_iface,
     70        .interfaces[USB_DEV_IFACE] = &hc_usb_iface,
    5671        .default_handler = default_connection_handler
    5772};
Note: See TracChangeset for help on using the changeset viewer.