Changeset 19a1800 in mainline for uspace/lib/usbvirt/src/main.c


Ignore:
Timestamp:
2011-03-01T22:20:56Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e24e7b1
Parents:
976f546 (diff), ac8285d (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 the current development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/src/main.c

    r976f546 r19a1800  
    2727 */
    2828
    29 /** @addtogroup libusbvirt usb
     29/** @addtogroup libusbvirt
    3030 * @{
    3131 */
     
    159159{
    160160        if (dev->vhcd_phone > 0) {
    161                 ipc_hangup(dev->vhcd_phone);
     161                async_hangup(dev->vhcd_phone);
    162162        }
    163163       
     
    173173        virtual_device_t *dev = find_device_by_id(0);
    174174        if (dev == NULL) {
    175                 ipc_answer_0(iid, EINVAL);
     175                async_answer_0(iid, EINVAL);
    176176                printf("Ooops\n");
    177177                return;
     
    183183/** Create necessary phones for communication with virtual HCD.
    184184 * This function wraps following calls:
    185  * -# open <code>/dev/devices/\\virt\\usbhc for reading
     185 * -# open <code>/dev/devices/\\virt\\usbhc</code> for reading
    186186 * -# access phone of file opened in previous step
    187187 * -# create callback through just opened phone
     
    203203        }
    204204       
    205         const char *vhc_path = "/virt/usbhc";
     205        const char *vhc_path = "/virt/usbhc/hc";
    206206        int rc;
    207207        devman_handle_t handle;
     
    220220        }
    221221       
    222         sysarg_t phonehash;
    223         rc = ipc_connect_to_me(hcd_phone, 0, 0, 0, &phonehash);
     222        rc = async_connect_to_me(hcd_phone, 0, 0, 0, callback_connection);
    224223        if (rc != EOK) {
    225224                printf("ipc_connect_to_me() failed\n");
     
    232231        virtual_device->vhcd_phone = hcd_phone;
    233232        virtual_device->id = 0;
    234        
    235         async_new_connection(phonehash, 0, NULL, callback_connection);
    236233       
    237234        return EOK;
Note: See TracChangeset for help on using the changeset viewer.