Changeset f2962621 in mainline for uspace/drv/vhc/devices.c


Ignore:
Timestamp:
2010-12-17T10:14:01Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6e5dc07
Parents:
9223dc5c (diff), 11658b64 (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:

merge with usb/development

File:
1 edited

Legend:

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

    r9223dc5c rf2962621  
    4747#include "devices.h"
    4848#include "hub.h"
     49#include "hub/virthub.h"
    4950#include "vhcd.h"
    5051
     
    6970        list_append(&dev->link, &devices);
    7071       
    71         hub_add_device(dev);
     72        virthub_connect_device(&virtual_hub_device, dev);
    7273       
    7374        return dev;
     
    7879void virtdev_destroy_device(virtdev_connection_t *dev)
    7980{
    80         hub_remove_device(dev);
     81        virthub_disconnect_device(&virtual_hub_device, dev);
    8182        list_remove(&dev->link);
    8283        free(dev);
     
    9495                    = list_get_instance(pos, virtdev_connection_t, link);
    9596               
    96                 if (!hub_can_device_signal(dev)) {
     97                if (!virthub_is_device_enabled(&virtual_hub_device, dev)) {
    9798                        continue;
    9899                }
    99100               
    100101                ipc_call_t answer_data;
    101                 ipcarg_t answer_rc;
     102                sysarg_t answer_rc;
    102103                aid_t req;
    103104                int rc = EOK;
     
    145146         * (if the address matches).
    146147         */
    147         if (virthub_dev.address == transaction->target.address) {
     148        if (virtual_hub_device.address == transaction->target.address) {
    148149                size_t tmp;
    149150                dprintf(1, "sending `%s' transaction to hub",
     
    151152                switch (transaction->type) {
    152153                        case USBVIRT_TRANSACTION_SETUP:
    153                                 virthub_dev.transaction_setup(&virthub_dev,
     154                                virtual_hub_device.transaction_setup(
     155                                    &virtual_hub_device,
    154156                                    transaction->target.endpoint,
    155157                                    transaction->buffer, transaction->len);
     
    157159                               
    158160                        case USBVIRT_TRANSACTION_IN:
    159                                 virthub_dev.transaction_in(&virthub_dev,
     161                                virtual_hub_device.transaction_in(
     162                                    &virtual_hub_device,
    160163                                    transaction->target.endpoint,
    161164                                    transaction->buffer, transaction->len,
     
    167170                               
    168171                        case USBVIRT_TRANSACTION_OUT:
    169                                 virthub_dev.transaction_out(&virthub_dev,
     172                                virtual_hub_device.transaction_out(
     173                                    &virtual_hub_device,
    170174                                    transaction->target.endpoint,
    171175                                    transaction->buffer, transaction->len);
Note: See TracChangeset for help on using the changeset viewer.