Index: uspace/drv/vhc/connhost.c
===================================================================
--- uspace/drv/vhc/connhost.c	(revision ce687bbe8bd15e602d59d8fa7a3af3ee1abc3fb6)
+++ uspace/drv/vhc/connhost.c	(revision c4ba29c7688e121e2c22a263ae8e83c21b9fc046)
@@ -43,7 +43,7 @@
 typedef struct {
 	usb_direction_t direction;
-	usbhc_iface_transfer_out_callback_t out_callback;
-	usbhc_iface_transfer_in_callback_t in_callback;
-	device_t *dev;
+	usb_hcd_transfer_callback_out_t out_callback;
+	usb_hcd_transfer_callback_in_t in_callback;
+	usb_hc_device_t *hc;
 	void *arg;
 } transfer_info_t;
@@ -56,10 +56,10 @@
 	switch (transfer->direction) {
 		case USB_DIRECTION_IN:
-			transfer->in_callback(transfer->dev,
+			transfer->in_callback(transfer->hc,
 			    size, outcome,
 			    transfer->arg);
 			break;
 		case USB_DIRECTION_OUT:
-			transfer->out_callback(transfer->dev,
+			transfer->out_callback(transfer->hc,
 			    outcome,
 			    transfer->arg);
@@ -73,5 +73,5 @@
 }
 
-static transfer_info_t *create_transfer_info(device_t *dev,
+static transfer_info_t *create_transfer_info(usb_hc_device_t *hc,
     usb_direction_t direction, void *arg)
 {
@@ -82,22 +82,27 @@
 	transfer->out_callback = NULL;
 	transfer->arg = arg;
-	transfer->dev = dev;
+	transfer->hc = hc;
 
 	return transfer;
 }
 
-static int enqueue_transfer_out(device_t *dev,
-    usb_target_t target, usb_transfer_type_t transfer_type,
+static int enqueue_transfer_out(usb_hc_device_t *hc,
+    usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint,
     void *buffer, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
+    usb_hcd_transfer_callback_out_t callback, void *arg)
 {
 	printf(NAME ": transfer OUT [%d.%d (%s); %u]\n",
-	    target.address, target.endpoint,
-	    usb_str_transfer_type(transfer_type),
+	    dev->address, endpoint->endpoint,
+	    usb_str_transfer_type(endpoint->transfer_type),
 	    size);
 
 	transfer_info_t *transfer
-	    = create_transfer_info(dev, USB_DIRECTION_OUT, arg);
+	    = create_transfer_info(hc, USB_DIRECTION_OUT, arg);
 	transfer->out_callback = callback;
+
+	usb_target_t target = {
+		.address = dev->address,
+		.endpoint = endpoint->endpoint
+	};
 
 	hc_add_transaction_to_device(false, target, buffer, size,
@@ -107,17 +112,22 @@
 }
 
-static int enqueue_transfer_setup(device_t *dev,
-    usb_target_t target, usb_transfer_type_t transfer_type,
+static int enqueue_transfer_setup(usb_hc_device_t *hc,
+    usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint,
     void *buffer, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
+    usb_hcd_transfer_callback_out_t callback, void *arg)
 {
 	printf(NAME ": transfer SETUP [%d.%d (%s); %u]\n",
-	    target.address, target.endpoint,
-	    usb_str_transfer_type(transfer_type),
+	    dev->address, endpoint->endpoint,
+	    usb_str_transfer_type(endpoint->transfer_type),
 	    size);
 
 	transfer_info_t *transfer
-	    = create_transfer_info(dev, USB_DIRECTION_OUT, arg);
+	    = create_transfer_info(hc, USB_DIRECTION_OUT, arg);
 	transfer->out_callback = callback;
+
+	usb_target_t target = {
+		.address = dev->address,
+		.endpoint = endpoint->endpoint
+	};
 
 	hc_add_transaction_to_device(true, target, buffer, size,
@@ -127,17 +137,22 @@
 }
 
-static int enqueue_transfer_in(device_t *dev,
-    usb_target_t target, usb_transfer_type_t transfer_type,
+static int enqueue_transfer_in(usb_hc_device_t *hc,
+    usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint,
     void *buffer, size_t size,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
+    usb_hcd_transfer_callback_in_t callback, void *arg)
 {
 	printf(NAME ": transfer IN [%d.%d (%s); %u]\n",
-	    target.address, target.endpoint,
-	    usb_str_transfer_type(transfer_type),
+	    dev->address, endpoint->endpoint,
+	    usb_str_transfer_type(endpoint->transfer_type),
 	    size);
 
 	transfer_info_t *transfer
-	    = create_transfer_info(dev, USB_DIRECTION_IN, arg);
+	    = create_transfer_info(hc, USB_DIRECTION_IN, arg);
 	transfer->in_callback = callback;
+
+	usb_target_t target = {
+		.address = dev->address,
+		.endpoint = endpoint->endpoint
+	};
 
 	hc_add_transaction_from_device(target, buffer, size,
@@ -148,94 +163,8 @@
 
 
-static int interrupt_out(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	return enqueue_transfer_out(dev, target, USB_TRANSFER_INTERRUPT,
-	    data, size,
-	    callback, arg);
-}
-
-static int interrupt_in(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
-{
-	return enqueue_transfer_in(dev, target, USB_TRANSFER_INTERRUPT,
-	    data, size,
-	    callback, arg);
-}
-
-static int control_write_setup(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	return enqueue_transfer_setup(dev, target, USB_TRANSFER_CONTROL,
-	    data, size,
-	    callback, arg);
-}
-
-static int control_write_data(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	return enqueue_transfer_out(dev, target, USB_TRANSFER_CONTROL,
-	    data, size,
-	    callback, arg);
-}
-
-static int control_write_status(device_t *dev, usb_target_t target,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
-{
-	return enqueue_transfer_in(dev, target, USB_TRANSFER_CONTROL,
-	    NULL, 0,
-	    callback, arg);
-}
-
-static int control_read_setup(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	return enqueue_transfer_setup(dev, target, USB_TRANSFER_CONTROL,
-	    data, size,
-	    callback, arg);
-}
-
-static int control_read_data(device_t *dev, usb_target_t target,
-    void *data, size_t size,
-    usbhc_iface_transfer_in_callback_t callback, void *arg)
-{
-	return enqueue_transfer_in(dev, target, USB_TRANSFER_CONTROL,
-	    data, size,
-	    callback, arg);
-}
-
-static int control_read_status(device_t *dev, usb_target_t target,
-    usbhc_iface_transfer_out_callback_t callback, void *arg)
-{
-	return enqueue_transfer_out(dev, target, USB_TRANSFER_CONTROL,
-	    NULL, 0,
-	    callback, arg);
-}
-
-
-usbhc_iface_t vhc_iface = {
-	.tell_address = tell_address,
-
-	.reserve_default_address = reserve_default_address,
-	.release_default_address = release_default_address,
-	.request_address = request_address,
-	.bind_address = bind_address,
-	.release_address = release_address,
-
-	.interrupt_out = interrupt_out,
-	.interrupt_in = interrupt_in,
-
-	.control_write_setup = control_write_setup,
-	.control_write_data = control_write_data,
-	.control_write_status = control_write_status,
-
-	.control_read_setup = control_read_setup,
-	.control_read_data = control_read_data,
-	.control_read_status = control_read_status
+usb_hcd_transfer_ops_t vhc_transfer_ops = {
+	.transfer_out = enqueue_transfer_out,
+	.transfer_in = enqueue_transfer_in,
+	.transfer_setup = enqueue_transfer_setup
 };
 
