Changeset b4b534ac in mainline for uspace/drv/bus/usb/vhc/devconn.c
- Timestamp:
- 2016-07-22T08:24:47Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/devconn.c
r5b18137 rb4b534ac 51 51 static int vhc_virtdev_plug_generic(vhc_data_t *vhc, 52 52 async_sess_t *sess, usbvirt_device_t *virtdev, 53 uintptr_t *handle, bool connect )53 uintptr_t *handle, bool connect, usb_address_t address) 54 54 { 55 55 vhc_virtdev_t *dev = vhc_virtdev_create(); … … 60 60 dev->dev_sess = sess; 61 61 dev->dev_local = virtdev; 62 dev->address = address; 62 63 63 64 fibril_mutex_lock(&vhc->guard); … … 78 79 if (connect) { 79 80 // FIXME: check status 80 (void) virthub_connect_device( vhc->hub, dev);81 (void) virthub_connect_device(&vhc->hub, dev); 81 82 } 82 83 … … 86 87 int vhc_virtdev_plug(vhc_data_t *vhc, async_sess_t *sess, uintptr_t *handle) 87 88 { 88 return vhc_virtdev_plug_generic(vhc, sess, NULL, handle, true );89 return vhc_virtdev_plug_generic(vhc, sess, NULL, handle, true, 0); 89 90 } 90 91 91 92 int vhc_virtdev_plug_local(vhc_data_t *vhc, usbvirt_device_t *dev, uintptr_t *handle) 92 93 { 93 return vhc_virtdev_plug_generic(vhc, NULL, dev, handle, true );94 return vhc_virtdev_plug_generic(vhc, NULL, dev, handle, true, 0); 94 95 } 95 96 96 int vhc_virtdev_plug_hub(vhc_data_t *vhc, usbvirt_device_t *dev, uintptr_t *handle )97 int vhc_virtdev_plug_hub(vhc_data_t *vhc, usbvirt_device_t *dev, uintptr_t *handle, usb_address_t address) 97 98 { 98 return vhc_virtdev_plug_generic(vhc, NULL, dev, handle, false );99 return vhc_virtdev_plug_generic(vhc, NULL, dev, handle, false, address); 99 100 } 100 101 … … 104 105 105 106 // FIXME: check status 106 (void) virthub_disconnect_device( vhc->hub, dev);107 (void) virthub_disconnect_device(&vhc->hub, dev); 107 108 108 109 fibril_mutex_lock(&vhc->guard);
Note:
See TracChangeset
for help on using the changeset viewer.