Index: uspace/lib/usbhost/include/usb/host/endpoint.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 42679089e62747f5e00b53db2cc50e13781157a1)
+++ uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 83c31234d59d471e7452a9d925f21cbe86619d85)
@@ -36,12 +36,11 @@
 #define LIBUSBHOST_HOST_ENDPOINT_H
 
-#include <assert.h>
 #include <bool.h>
 #include <adt/list.h>
 #include <fibril_synch.h>
-
 #include <usb/usb.h>
 
 typedef struct endpoint {
+	link_t link;
 	usb_address_t address;
 	usb_endpoint_t endpoint;
@@ -50,4 +49,5 @@
 	usb_speed_t speed;
 	size_t max_packet_size;
+	size_t bandwidth;
 	unsigned toggle:1;
 	fibril_mutex_t guard;
@@ -62,8 +62,7 @@
 } endpoint_t;
 
-endpoint_t * endpoint_get(usb_address_t address, usb_endpoint_t endpoint,
+endpoint_t * endpoint_create(usb_address_t address, usb_endpoint_t endpoint,
     usb_direction_t direction, usb_transfer_type_t type, usb_speed_t speed,
-    size_t max_packet_size);
-
+    size_t max_packet_size, size_t bw);
 void endpoint_destroy(endpoint_t *instance);
 
@@ -71,15 +70,11 @@
     void *data, void (*destroy_hook)(endpoint_t *),
     int (*toggle_get)(void *), void (*toggle_set)(void *, int));
-
 void endpoint_clear_hc_data(endpoint_t *instance);
 
 void endpoint_use(endpoint_t *instance);
-
 void endpoint_release(endpoint_t *instance);
 
 int endpoint_toggle_get(endpoint_t *instance);
-
 void endpoint_toggle_set(endpoint_t *instance, int toggle);
-
 void endpoint_toggle_reset_filtered(endpoint_t *instance, usb_target_t target);
 #endif
Index: uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h	(revision 42679089e62747f5e00b53db2cc50e13781157a1)
+++ uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h	(revision 83c31234d59d471e7452a9d925f21cbe86619d85)
@@ -72,6 +72,5 @@
 
 endpoint_t * usb_endpoint_manager_get_ep(usb_endpoint_manager_t *instance,
-    usb_address_t address, usb_endpoint_t ep, usb_direction_t direction,
-    size_t *bw);
+    usb_address_t address, usb_endpoint_t ep, usb_direction_t direction);
 
 void usb_endpoint_manager_reset_if_need(
@@ -84,6 +83,10 @@
     size_t data_size)
 {
-	endpoint_t *ep = endpoint_get(
-	    address, endpoint, direction, type, speed, max_packet_size);
+	assert(instance);
+	const size_t bw =
+	    instance->bw_count(speed, type, data_size, max_packet_size);
+
+	endpoint_t *ep = endpoint_create(
+	    address, endpoint, direction, type, speed, max_packet_size, bw);
 	if (!ep)
 		return ENOMEM;
Index: uspace/lib/usbhost/src/endpoint.c
===================================================================
--- uspace/lib/usbhost/src/endpoint.c	(revision 42679089e62747f5e00b53db2cc50e13781157a1)
+++ uspace/lib/usbhost/src/endpoint.c	(revision 83c31234d59d471e7452a9d925f21cbe86619d85)
@@ -39,7 +39,7 @@
 #include <usb/host/endpoint.h>
 
-endpoint_t * endpoint_get(usb_address_t address, usb_endpoint_t endpoint,
+endpoint_t * endpoint_create(usb_address_t address, usb_endpoint_t endpoint,
     usb_direction_t direction, usb_transfer_type_t type, usb_speed_t speed,
-    size_t max_packet_size)
+    size_t max_packet_size, size_t bw)
 {
 	endpoint_t *instance = malloc(sizeof(endpoint_t));
@@ -51,4 +51,5 @@
 		instance->speed = speed;
 		instance->max_packet_size = max_packet_size;
+		instance->bandwidth = bw;
 		instance->toggle = 0;
 		instance->active = false;
@@ -57,4 +58,5 @@
 		instance->hc_data.toggle_get = NULL;
 		instance->hc_data.toggle_set = NULL;
+		link_initialize(&instance->link);
 		fibril_mutex_initialize(&instance->guard);
 		fibril_condvar_initialize(&instance->avail);
Index: uspace/lib/usbhost/src/iface.c
===================================================================
--- uspace/lib/usbhost/src/iface.c	(revision 42679089e62747f5e00b53db2cc50e13781157a1)
+++ uspace/lib/usbhost/src/iface.c	(revision 83c31234d59d471e7452a9d925f21cbe86619d85)
@@ -49,9 +49,6 @@
 	assert(hcd);
 
-	int ret;
-
-	size_t res_bw;
 	endpoint_t *ep = usb_endpoint_manager_get_ep(&hcd->ep_manager,
-	    target.address, target.endpoint, direction, &res_bw);
+	    target.address, target.endpoint, direction);
 	if (ep == NULL) {
 		usb_log_error("Endpoint(%d:%d) not registered for %s.\n",
@@ -65,8 +62,9 @@
 	const size_t bw = bandwidth_count_usb11(
 	    ep->speed, ep->transfer_type, size, ep->max_packet_size);
-	if (res_bw < bw) {
+	/* 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",
-		    target.address, target.endpoint, name, bw, res_bw);
+		    ep->address, ep->endpoint, name, bw, ep->bandwidth);
 		return ENOSPC;
 	}
@@ -84,5 +82,5 @@
 	}
 
-	ret = hcd->schedule(hcd, batch);
+	const int ret = hcd->schedule(hcd, batch);
 	if (ret != EOK)
 		usb_transfer_batch_dispose(batch);
@@ -190,6 +188,7 @@
 	    max_packet_size, interval);
 
-	endpoint_t *ep = endpoint_get(
-	    address, endpoint, direction, transfer_type, speed, max_packet_size);
+	endpoint_t *ep =
+	    endpoint_create(address, endpoint, direction, transfer_type,
+	        speed, max_packet_size, 0);
 	if (!ep)
 		return ENOMEM;
Index: uspace/lib/usbhost/src/usb_endpoint_manager.c
===================================================================
--- uspace/lib/usbhost/src/usb_endpoint_manager.c	(revision 42679089e62747f5e00b53db2cc50e13781157a1)
+++ uspace/lib/usbhost/src/usb_endpoint_manager.c	(revision 83c31234d59d471e7452a9d925f21cbe86619d85)
@@ -35,13 +35,7 @@
 
 #define BUCKET_COUNT 7
-
 #define MAX_KEYS (3)
-typedef struct {
-	link_t link;
-	size_t bw;
-	endpoint_t *ep;
-} node_t;
-/*----------------------------------------------------------------------------*/
-static hash_index_t node_hash(unsigned long key[])
+
+static hash_index_t usb_hash(unsigned long key[])
 {
 	/* USB endpoints use 4 bits, thus ((key[0] << 4) | key[1])
@@ -50,20 +44,20 @@
 }
 /*----------------------------------------------------------------------------*/
-static int node_compare(unsigned long key[], hash_count_t keys, link_t *item)
+static int ep_compare(unsigned long key[], hash_count_t keys, link_t *item)
 {
 	assert(item);
-	node_t *node = hash_table_get_instance(item, node_t, link);
-	assert(node);
-	assert(node->ep);
+	endpoint_t *ep = hash_table_get_instance(item, endpoint_t, link);
+	assert(ep);
 	bool match = true;
 	switch (keys) {
 	case 3:
 		match = match &&
-		    ((key[2] == node->ep->direction)
-		    || (node->ep->direction == USB_DIRECTION_BOTH));
+		    ((key[2] == ep->direction)
+		    || (ep->direction == USB_DIRECTION_BOTH)
+		    || (key[2] == USB_DIRECTION_BOTH));
 	case 2:
-		match = match && (key[1] == (unsigned long)node->ep->endpoint);
+		match = match && (key[1] == (unsigned long)ep->endpoint);
 	case 1:
-		match = match && (key[0] == (unsigned long)node->ep->address);
+		match = match && (key[0] == (unsigned long)ep->address);
 		break;
 	default:
@@ -73,24 +67,23 @@
 }
 /*----------------------------------------------------------------------------*/
-static void node_remove(link_t *item)
+static void ep_remove(link_t *item)
 {
 	assert(item);
-	node_t *node = hash_table_get_instance(item, node_t, link);
-	endpoint_destroy(node->ep);
-	free(node);
-}
-/*----------------------------------------------------------------------------*/
-static void node_toggle_reset_filtered(link_t *item, void *arg)
+	endpoint_t *ep = hash_table_get_instance(item, endpoint_t, link);
+	endpoint_destroy(ep);
+}
+/*----------------------------------------------------------------------------*/
+static void toggle_reset_filtered(link_t *item, void *arg)
 {
 	assert(item);
-	node_t *node = hash_table_get_instance(item, node_t, link);
-	usb_target_t *target = arg;
-	endpoint_toggle_reset_filtered(node->ep, *target);
+	endpoint_t *ep = hash_table_get_instance(item, endpoint_t, link);
+	const usb_target_t *target = arg;
+	endpoint_toggle_reset_filtered(ep, *target);
 }
 /*----------------------------------------------------------------------------*/
 static hash_table_operations_t op = {
-	.hash = node_hash,
-	.compare = node_compare,
-	.remove_callback = node_remove,
+	.hash = usb_hash,
+	.compare = ep_compare,
+	.remove_callback = ep_remove,
 };
 /*----------------------------------------------------------------------------*/
@@ -161,10 +154,10 @@
 	assert(instance->bw_count);
 	assert(ep);
-	const size_t bw = instance->bw_count(ep->speed, ep->transfer_type,
+	ep->bandwidth = instance->bw_count(ep->speed, ep->transfer_type,
 	    data_size, ep->max_packet_size);
 
 	fibril_mutex_lock(&instance->guard);
 
-	if (bw > instance->free_bw) {
+	if (ep->bandwidth > instance->free_bw) {
 		fibril_mutex_unlock(&instance->guard);
 		return ENOSPC;
@@ -181,16 +174,6 @@
 	}
 
-	node_t *node = malloc(sizeof(node_t));
-	if (node == NULL) {
-		fibril_mutex_unlock(&instance->guard);
-		return ENOMEM;
-	}
-
-	node->bw = bw;
-	node->ep = ep;
-	link_initialize(&node->link);
-
-	hash_table_insert(&instance->ep_table, key, &node->link);
-	instance->free_bw -= bw;
+	hash_table_insert(&instance->ep_table, key, &ep->link);
+	instance->free_bw -= ep->bandwidth;
 	fibril_mutex_unlock(&instance->guard);
 	return EOK;
@@ -210,11 +193,11 @@
 	}
 
-	node_t *node = hash_table_get_instance(item, node_t, link);
-	if (node->ep->active) {
+	endpoint_t *ep = hash_table_get_instance(item, endpoint_t, link);
+	if (ep->active) {
 		fibril_mutex_unlock(&instance->guard);
 		return EBUSY;
 	}
 
-	instance->free_bw += node->bw;
+	instance->free_bw += ep->bandwidth;
 	hash_table_remove(&instance->ep_table, key, MAX_KEYS);
 
@@ -224,6 +207,5 @@
 /*----------------------------------------------------------------------------*/
 endpoint_t * usb_endpoint_manager_get_ep(usb_endpoint_manager_t *instance,
-    usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
-    size_t *bw)
+    usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction)
 {
 	assert(instance);
@@ -236,10 +218,8 @@
 		return NULL;
 	}
-	const node_t *node = hash_table_get_instance(item, node_t, link);
-	if (bw)
-		*bw = node->bw;
+	endpoint_t *ep = hash_table_get_instance(item, endpoint_t, link);
 
 	fibril_mutex_unlock(&instance->guard);
-	return node->ep;
+	return ep;
 }
 /*----------------------------------------------------------------------------*/
@@ -272,5 +252,5 @@
 			fibril_mutex_lock(&instance->guard);
 			hash_table_apply(&instance->ep_table,
-			    node_toggle_reset_filtered, &reset_target);
+			    toggle_reset_filtered, &reset_target);
 			fibril_mutex_unlock(&instance->guard);
 		}
@@ -285,5 +265,5 @@
 			fibril_mutex_lock(&instance->guard);
 			hash_table_apply(&instance->ep_table,
-			    node_toggle_reset_filtered, &reset_target);
+			    toggle_reset_filtered, &reset_target);
 			fibril_mutex_unlock(&instance->guard);
 		}
