Ignore:
Timestamp:
2010-10-15T16:32:57Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
186d630
Parents:
73301a0
Message:

Virtual USB device tracks its address

Now, each virtual device tracks its address and its state.

The virtual HC dispatches all transactions to all devices, thus
more precisely simulating situation on USB. The usbvirt framework
then decides whether it can accept the data or not, based on
their destination address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/bus/usb/hcd/virtual/conndev.c

    r73301a0 r47e3a8e  
    4646    virtdev_connection_t *dev)
    4747{
    48         usb_endpoint_t endpoint = IPC_GET_ARG1(icall);
    4948        usb_target_t target = {
    50                 .address = dev->address,
    51                 .endpoint = endpoint
     49                .address = IPC_GET_ARG1(icall),
     50                .endpoint = IPC_GET_ARG2(icall)
    5251        };
    5352       
     
    8079        assert(dev != NULL);
    8180       
    82         dprintf("phone%#x: virtual device %d connected [%d]",
    83             phone_hash, dev->id, dev->address);
     81        dprintf("phone%#x: virtual device %d connected",
     82            phone_hash, dev->id);
    8483       
    8584        while (true) {
     
    9392                                ipc_hangup(dev->phone);
    9493                                ipc_answer_0(callid, EOK);
    95                                 dprintf("phone%#x: device %d [%d] hang-up",
    96                                     phone_hash, dev->id, dev->address);
     94                                dprintf("phone%#x: device %d hang-up",
     95                                    phone_hash, dev->id);
    9796                                return;
    9897                       
Note: See TracChangeset for help on using the changeset viewer.