Index: uspace/lib/usbhost/src/hcd.c
===================================================================
--- uspace/lib/usbhost/src/hcd.c	(revision ae03552eb937f4e35adedcd5ff4ad17ed84ab526)
+++ uspace/lib/usbhost/src/hcd.c	(revision a59769732a4cc751534990289b6011e93f09f53b)
@@ -44,9 +44,11 @@
 #include "hcd.h"
 
-/** Calls ep_add_hook upon endpoint registration.
+
+/*[>* Calls ep_add_hook upon endpoint registration.
  * @param ep Endpoint to be registered.
  * @param arg hcd_t in disguise.
  * @return Error code.
- */
+ * OH TODO: remove
+ <]
 static int register_helper(endpoint_t *ep, void *arg)
 {
@@ -59,8 +61,9 @@
 }
 
-/** Calls ep_remove_hook upon endpoint removal.
+[>* Calls ep_remove_hook upon endpoint removal.
  * @param ep Endpoint to be unregistered.
  * @param arg hcd_t in disguise.
- */
+ * OH TODO: remove
+ <]
 static void unregister_helper(endpoint_t *ep, void *arg)
 {
@@ -72,16 +75,17 @@
 }
 
-/** Calls ep_remove_hook upon endpoint removal. Prints warning.
+[>* Calls ep_remove_hook upon endpoint removal. Prints warning.
  *  * @param ep Endpoint to be unregistered.
  *   * @param arg hcd_t in disguise.
- *    */
+ * OH TODO: remove
+ *    <]
 static void unregister_helper_warn(endpoint_t *ep, void *arg)
 {
         assert(ep);
         usb_log_warning("Endpoint %d:%d %s was left behind, removing.\n",
-            ep->address, ep->endpoint, usb_str_direction(ep->direction));
+            ep->target.address, ep->target.endpoint, usb_str_direction(ep->direction));
 	unregister_helper(ep, arg);
 }
-
+*/
 
 /** Initialize hcd_t structure.
@@ -93,11 +97,8 @@
  * @param bw_count Bandwidth compute function, passed to endpoint manager.
  */
-void hcd_init(hcd_t *hcd, usb_speed_t max_speed, size_t bandwidth,
-    bw_count_func_t bw_count)
-{
-	assert(hcd);
-	usb_bus_init(&hcd->bus, bandwidth, bw_count, max_speed);
-
-	hcd_set_implementation(hcd, NULL, NULL);
+void hcd_init(hcd_t *hcd) {
+	assert(hcd);
+
+	hcd_set_implementation(hcd, NULL, NULL, NULL);
 }
 
@@ -106,6 +107,5 @@
 	assert(hcd);
 	usb_address_t address = 0;
-	const int ret = usb_bus_request_address(
-	    &hcd->bus, &address, false, speed);
+	const int ret = bus_request_address(hcd->bus, &address, false, speed);
 	if (ret != EOK)
 		return ret;
@@ -116,6 +116,6 @@
 {
 	assert(hcd);
-	return usb_bus_remove_address(&hcd->bus, address,
-	    unregister_helper_warn, hcd);
+	return bus_release_address(hcd->bus, address);
+	// OH TODO removed helper
 }
 
@@ -124,5 +124,5 @@
 	assert(hcd);
 	usb_address_t address = 0;
-	return usb_bus_request_address(&hcd->bus, &address, true, speed);
+	return bus_request_address(hcd->bus, &address, true, speed);
 }
 
@@ -132,7 +132,25 @@
 {
 	assert(hcd);
-	return usb_bus_add_ep(&hcd->bus, target.address,
-	    target.endpoint, dir, type, max_packet_size, packets, size,
-	    register_helper, hcd, tt_address, tt_port);
+
+	/* Temporary reference */
+	endpoint_t *ep = bus_create_endpoint(hcd->bus);
+	if (!ep)
+		return ENOMEM;
+
+	ep->target = target;
+	ep->direction = dir;
+	ep->transfer_type = type;
+	ep->max_packet_size = max_packet_size;
+	ep->packets = packets;
+
+	ep->tt.address = tt_address;
+	ep->tt.port = tt_port;
+
+	const int err = bus_register_endpoint(hcd->bus, ep);
+
+	/* drop Temporary reference */
+	endpoint_del_ref(ep);
+
+	return err;
 }
 
@@ -140,6 +158,10 @@
 {
 	assert(hcd);
-	return usb_bus_remove_ep(&hcd->bus, target.address,
-	    target.endpoint, dir, unregister_helper, hcd);
+	endpoint_t *ep = bus_find_endpoint(hcd->bus, target, dir);
+	if (!ep)
+		return ENOENT;
+
+	return bus_release_endpoint(hcd->bus, ep);
+	// OH TODO removed helper
 }
 
@@ -159,5 +181,5 @@
 		usb_log_debug2("Reseting toggle on %d:%d.\n",
 		    toggle->target.address, toggle->target.endpoint);
-		usb_bus_reset_toggle(&toggle->hcd->bus,
+		bus_reset_toggle(toggle->hcd->bus,
 		    toggle->target, toggle->target.endpoint == 0);
 	}
@@ -185,6 +207,5 @@
 	assert(hcd);
 
-	endpoint_t *ep = usb_bus_find_ep(&hcd->bus,
-	    target.address, target.endpoint, direction);
+	endpoint_t *ep = bus_find_endpoint(hcd->bus, target, direction);
 	if (ep == NULL) {
 		usb_log_error("Endpoint(%d:%d) not registered for %s.\n",
@@ -196,11 +217,10 @@
 	    name, target.address, target.endpoint, size, ep->max_packet_size);
 
-	const size_t bw = bandwidth_count_usb11(
-	    ep->speed, ep->transfer_type, size, ep->max_packet_size);
+	const size_t bw = bus_count_bw(ep, size);
 	/* Check if we have enough bandwidth reserved */
 	if (ep->bandwidth < bw) {
 		usb_log_error("Endpoint(%d:%d) %s needs %zu bw "
 		    "but only %zu is reserved.\n",
-		    ep->address, ep->endpoint, name, bw, ep->bandwidth);
+		    ep->target.address, ep->target.endpoint, name, bw, ep->bandwidth);
 		return ENOSPC;
 	}
